diff options
Diffstat (limited to 'lib/libmalloc/_emalloc.c')
-rw-r--r-- | lib/libmalloc/_emalloc.c | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/lib/libmalloc/_emalloc.c b/lib/libmalloc/_emalloc.c new file mode 100644 index 0000000000000..347e8960f0883 --- /dev/null +++ b/lib/libmalloc/_emalloc.c @@ -0,0 +1,55 @@ +/* Author: Mark Moraes <moraes@csri.toronto.edu> */ + +/*LINTLIBRARY*/ + +#include "defs.h" +#include "globals.h" +#include "trace.h" + +RCSID("$Id: _emalloc.c,v 1.1 1994/03/06 22:59:19 nate Exp $") + +univptr_t +__emalloc(nbytes, fname, linenum) +size_t nbytes; +const char *fname; +int linenum; +{ + univptr_t cp; + + PRTRACE(sprintf(_malloc_statsbuf, "%s:%d:", fname, linenum)); + cp = emalloc(nbytes); + RECORD_FILE_AND_LINE(cp, fname, linenum); + return(cp); +} + + +univptr_t +__erealloc(ptr, nbytes, fname, linenum) +univptr_t ptr; +size_t nbytes; +const char *fname; +int linenum; +{ + univptr_t cp; + + PRTRACE(sprintf(_malloc_statsbuf, "%s:%d:", fname, linenum)); + cp = erealloc(ptr, nbytes); + RECORD_FILE_AND_LINE(cp, fname, linenum); + return(cp); +} + +univptr_t +__ecalloc(nelem, sz, fname, linenum) +size_t nelem, sz; +const char *fname; +int linenum; +{ + univptr_t cp; + + PRTRACE(sprintf(_malloc_statsbuf, "%s:%d:", fname, linenum)); + cp = ecalloc(nelem, sz); + RECORD_FILE_AND_LINE(cp, fname, linenum); + return(cp); +} + + |