From 2f2b3a9b0e72eb25010d1fa757687fd8a87658ef Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Sun, 30 Jan 2005 07:49:18 +0000 Subject: [PATCH] Rename xmalloc() as malloc_or_panic(), xcalloc() as calloc_or_panic(). --- src/threads/malloc.c | 4 ++-- src/threads/malloc.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/threads/malloc.c b/src/threads/malloc.c index 9c83e3d..4f8675c 100644 --- a/src/threads/malloc.c +++ b/src/threads/malloc.c @@ -158,7 +158,7 @@ malloc (size_t size) kernel to panic in normal operation, so this function should only be used during kernel initialization. */ void * -xmalloc (size_t size) +malloc_or_panic (size_t size) { void *p = malloc (size); if (p == NULL && size > 0) @@ -192,7 +192,7 @@ calloc (size_t a, size_t b) kernel to panic in normal operation, so this function should only be used during kernel initialization. */ void * -xcalloc (size_t a, size_t b) +calloc_or_panic (size_t a, size_t b) { void *p = calloc (a, b); if (p == NULL && a > 0 && b > 0) diff --git a/src/threads/malloc.h b/src/threads/malloc.h index 4f0d0bf..a07a7b0 100644 --- a/src/threads/malloc.h +++ b/src/threads/malloc.h @@ -6,9 +6,9 @@ void malloc_init (void); void *malloc (size_t) __attribute__ ((malloc)); -void *xmalloc (size_t) __attribute__ ((malloc)); +void *malloc_or_panic (size_t) __attribute__ ((malloc)); void *calloc (size_t, size_t) __attribute__ ((malloc)); -void *xcalloc (size_t, size_t) __attribute__ ((malloc)); +void *calloc_or_panic (size_t, size_t) __attribute__ ((malloc)); void free (void *); #endif /* threads/malloc.h */ -- 2.30.2