forked from kashif/evolver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathalloca.c
28 lines (24 loc) · 1013 Bytes
/
alloca.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*************************************************************
* This file is part of the Surface Evolver source code. *
* Programmer: Ken Brakke, [email protected] *
*************************************************************/
/**********************************************************
*
* File: alloca.c
*
* Contents: Kludge substitute for alloca() for those
* systems that do not have it. alloca() is
* an old unix function that allocates memory
* from the stack. The version of YACC I use
* uses alloca in case of parsing stack overflow,
* so alloca should almost never be called.
* Link with this file only if the linker
* complains about not finding alloca.
* This file simply substitutes a call to
* malloc(), so represents a potential
* memory leak.
*/
#include "include.h"
void * alloca(size_t size)
{ return (void*)malloc(size);
}