1988-06-22 16:57:09 +00:00
|
|
|
/*
|
|
|
|
Rather than using malloc and realloc, which require testing
|
|
|
|
afterwards, we use a version that will either succeed or call
|
|
|
|
fatal().
|
|
|
|
*/
|
2019-03-17 14:42:00 +00:00
|
|
|
#ifndef ALLOC_H_
|
|
|
|
#define ALLOC_H_
|
1988-06-22 16:57:09 +00:00
|
|
|
|
2019-03-17 14:42:00 +00:00
|
|
|
#include "global.h"
|
|
|
|
|
|
|
|
char *Malloc(size sz, char *descr);
|
|
|
|
char *Realloc(char *old, size sz, char *descr);
|
1988-06-22 16:57:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
/* reallocation factor */
|
|
|
|
|
|
|
|
#define allocfrac(s) ((s) * 3 / 2)
|
|
|
|
|
2019-03-17 14:42:00 +00:00
|
|
|
#endif /* ALLOC_H_ */
|