aboutsummaryrefslogtreecommitdiff
path: root/gdb/utils.c
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>1999-12-22 21:45:38 +0000
committerJason Molenda <jmolenda@apple.com>1999-12-22 21:45:38 +0000
commited9a39ebf9f55562c7c582155f6721c3e685ce91 (patch)
treea4d79644b877ba407080f1e1120fdf203a1e50b7 /gdb/utils.c
parentd3a09475522de47cb8f641b3235d58ee10320f64 (diff)
downloadgdb-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.c17
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