diff options
author | Jason Molenda <jmolenda@apple.com> | 1999-12-22 21:45:38 +0000 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 1999-12-22 21:45:38 +0000 |
commit | ed9a39ebf9f55562c7c582155f6721c3e685ce91 (patch) | |
tree | a4d79644b877ba407080f1e1120fdf203a1e50b7 /gdb/utils.c | |
parent | d3a09475522de47cb8f641b3235d58ee10320f64 (diff) | |
download | gdb-ed9a39ebf9f55562c7c582155f6721c3e685ce91.zip gdb-ed9a39ebf9f55562c7c582155f6721c3e685ce91.tar.gz gdb-ed9a39ebf9f55562c7c582155f6721c3e685ce91.tar.bz2 |
import gdb-1999-12-21 snapshot
Diffstat (limited to 'gdb/utils.c')
-rw-r--r-- | gdb/utils.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gdb/utils.c b/gdb/utils.c index cbaf0cc..596c0ae 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -931,6 +931,12 @@ request_quit (signo) #if !defined (USE_MMALLOC) +void * +mcalloc (void *md, size_t number, size_t size) +{ + return calloc (number, size); +} + PTR mmalloc (md, size) PTR md; @@ -1092,6 +1098,17 @@ xmalloc (size) return (xmmalloc ((PTR) NULL, size)); } +/* Like calloc but get error if no storage available */ + +PTR +xcalloc (size_t number, size_t size) +{ + void *mem = mcalloc (NULL, number, size); + if (mem == NULL) + nomem (number * size); + return mem; +} + /* Like mrealloc but get error if no storage available. */ PTR |