mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-09-23 14:14:56 +08:00
import gdb-1999-12-21 snapshot
This commit is contained in:
17
gdb/utils.c
17
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
|
||||
|
Reference in New Issue
Block a user