Re: In alloc and free of snd_pcm_hw_params_t, segmentation happens

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junji Umeno wrote:
> After an allocation with snd_pcm_hw_params_alloca,
> snd_pcm_hw_params_free stops by segmentation fault error.

There are two ways of allocating such structures:
1) Use snd_xxx_malloc() and snd_xxx_free() to allocate memory from the
   heap, or
2) use snd_xxx_alloca() to allocate memory from the stack.

The snd_xxx_alloca() functions behave just like alloca(): their memory
is automatically freed when the function returns.


HTH
Clemens

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux