* In alloc and free of snd_pcm_hw_params_t, segmentation happens
@ 2006-09-22 5:42 Junji Umeno
2006-09-22 8:26 ` Clemens Ladisch
0 siblings, 1 reply; 2+ messages in thread
From: Junji Umeno @ 2006-09-22 5:42 UTC (permalink / raw)
To: alsa-devel@lists.sourceforge.net
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: In alloc and free of snd_pcm_hw_params_t, segmentation happens
2006-09-22 5:42 In alloc and free of snd_pcm_hw_params_t, segmentation happens Junji Umeno
@ 2006-09-22 8:26 ` Clemens Ladisch
0 siblings, 0 replies; 2+ messages in thread
From: Clemens Ladisch @ 2006-09-22 8:26 UTC (permalink / raw)
To: Junji Umeno, alsa-devel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-09-22 8:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-22 5:42 In alloc and free of snd_pcm_hw_params_t, segmentation happens Junji Umeno
2006-09-22 8:26 ` Clemens Ladisch
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox