2016-07-25 09:04:22 +02:00
|
|
|
//---
|
|
|
|
//
|
2016-07-25 22:38:47 +02:00
|
|
|
// standard library module: alloca
|
2016-07-25 09:04:22 +02:00
|
|
|
//
|
|
|
|
// Allows dynamic memory allocation on the stack. Memory is automatically
|
2017-03-26 18:38:32 +02:00
|
|
|
// freed when the calling function exits, but this function suffers from
|
|
|
|
// risks of stack overflow; make sure you don't inline functions that use
|
|
|
|
// alloca or allocate more than a few hundred bytes with it.
|
2016-07-25 09:04:22 +02:00
|
|
|
//
|
|
|
|
//---
|
|
|
|
|
|
|
|
#ifndef _ALLOCA_H
|
2017-03-26 18:38:32 +02:00
|
|
|
#define _ALLOCA_H
|
2016-07-25 09:04:22 +02:00
|
|
|
|
|
|
|
#include <stddef.h>
|
|
|
|
|
|
|
|
/*
|
|
|
|
alloca()
|
|
|
|
Allocates a memory block on the stack.
|
|
|
|
*/
|
|
|
|
void *alloca(size_t size);
|
|
|
|
|
|
|
|
#define alloca(size) __builtin_alloca(size)
|
|
|
|
|
|
|
|
#endif // _ALLOCA_H
|