Rename xmalloc() as malloc_or_panic(),
[pintos-anon] / src / threads / malloc.c
index 9c83e3d438f780199166c3c92aa0893aa842f98f..4f8675cf90572164dbf715a35cfe33fc876e1f24 100644 (file)
@@ -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)