david/ipxe
david
/
ipxe
Archived
1
0
Fork 0

alloca() can be useful in some (limited) circumstances.

This commit is contained in:
Michael Brown 2007-01-11 23:19:31 +00:00
parent f31d91bce5
commit 79a399c05a
1 changed files with 25 additions and 0 deletions

25
src/include/alloca.h Normal file
View File

@ -0,0 +1,25 @@
#ifndef _ALLOCA_H
#define _ALLOCA_H
/**
* @file
*
* Temporary memory allocation
*
*/
#include <stdint.h>
/**
* Allocate temporary memory from the stack
*
* @v size Size to allocate
* @ret ptr Allocated memory
*
* This memory will be freed automatically when the containing
* function returns. There are several caveats regarding use of
* alloca(); use it only if you already know what they are.
*/
#define alloca(size) __builtin_alloca ( size )
#endif /* _ALLOCA_H */