In alloc and free of snd_pcm_hw_params_t, segmentation happens
Hi,
A simple question;
After an allocation with snd_pcm_hw_params_alloca, snd_pcm_hw_params_free stops by segmentation fault error. Is Alsa defferent from alloc and free coding structure?
Or I have any mistakes?
Segmentation error happens after set the params type to a pcm handler. The pcm handler holds it?
Yours,
Junji
-------------------------------------------------------------------------
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
Quoted 2 lines · Junji Umeno
After an allocation with
snd_pcm_hw_params_alloca,snd_pcm_hw_params_freestops 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