| 9 |
|
#define FBSIZE 72 /* size of malloc call */ |
| 10 |
|
|
| 11 |
|
|
| 12 |
– |
|
| 13 |
– |
|
| 14 |
– |
|
| 12 |
|
#include "meta.h" |
| 13 |
|
|
| 14 |
|
|
| 18 |
– |
|
| 19 |
– |
|
| 20 |
– |
|
| 15 |
|
extern int maxalloc; /* number of prims to allocate */ |
| 22 |
– |
|
| 16 |
|
int nalloc = 0; /* number allocated so far */ |
| 17 |
|
|
| 25 |
– |
|
| 26 |
– |
|
| 18 |
|
static PLIST freelist = {NULL, NULL}; |
| 19 |
|
|
| 20 |
|
|
| 21 |
+ |
static int morefree(void); |
| 22 |
|
|
| 23 |
|
|
| 24 |
|
PRIMITIVE * |
| 25 |
< |
palloc() /* allocate a primitive */ |
| 25 |
> |
palloc(void) /* allocate a primitive */ |
| 26 |
|
|
| 27 |
|
{ |
| 28 |
|
register PRIMITIVE *p; |
| 40 |
|
|
| 41 |
|
nalloc++; |
| 42 |
|
return(p); |
| 43 |
< |
} |
| 43 |
> |
} |
| 44 |
|
|
| 45 |
|
|
| 46 |
|
|
| 47 |
< |
|
| 48 |
< |
|
| 49 |
< |
pfree(p) /* free a primitive */ |
| 50 |
< |
|
| 59 |
< |
register PRIMITIVE *p; |
| 60 |
< |
|
| 47 |
> |
void |
| 48 |
> |
pfree( /* free a primitive */ |
| 49 |
> |
register PRIMITIVE *p |
| 50 |
> |
) |
| 51 |
|
{ |
| 52 |
|
|
| 53 |
|
if (p->args != NULL) { |
| 61 |
|
|
| 62 |
|
|
| 63 |
|
|
| 64 |
< |
|
| 65 |
< |
plfree(pl) /* free a primitive list */ |
| 66 |
< |
|
| 67 |
< |
register PLIST *pl; |
| 78 |
< |
|
| 64 |
> |
void |
| 65 |
> |
plfree( /* free a primitive list */ |
| 66 |
> |
register PLIST *pl |
| 67 |
> |
) |
| 68 |
|
{ |
| 69 |
|
register PRIMITIVE *p; |
| 70 |
|
|
| 83 |
|
|
| 84 |
|
|
| 85 |
|
|
| 97 |
– |
|
| 98 |
– |
|
| 86 |
|
static int |
| 87 |
< |
morefree() /* get more free space */ |
| 87 |
> |
morefree(void) /* get more free space */ |
| 88 |
|
|
| 89 |
|
{ |
| 90 |
|
register PRIMITIVE *p; |