[alsa-devel] [alsa-lib][PATCH] ctl: use automatic variable instead of call of alloca(3)

Takashi Iwai tiwai at suse.de
Mon Jun 27 17:57:05 CEST 2016


On Mon, 27 Jun 2016 16:37:36 +0200,
Takashi Sakamoto wrote:
> 
> Inner this library, layouts of all structures are public. At a compilation
> time, each size of the structures can be calculated. It means that we can
> use automatic variable instead of calling alloca(3) to program this
> library because in both ways storages are kept on stack frame of process
> VMA. Besides, the usage of automatic variables requires less instructions
> than calls of alloca(3). Furthermore, alloca(3) is not described in any
> C language standards.
> 
> This commit replaces calls of alloca(3) just for structures with automatic
> variables, for control features.
> 
> Signed-off-by: Takashi Sakamoto <o-takashi at sakamocchi.jp>

Applied, thanks.


Takashi


More information about the Alsa-devel mailing list