bootloader heap: more detailed errors on out-of-memory

It's hard enough to debug bootloader code already, let's gather as much
info as we can from error messages.

Change-Id: I47dff402286625d1213caa36ae6ee8ecf707dfad
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3574
Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
PulkoMandy
2020-12-31 02:58:10 +00:00
committed by waddlesplash
parent bba45f645b
commit baca34bee5
+4 -2
View File
@@ -464,7 +464,8 @@ malloc(size_t size)
return malloc_large(size);
if (size > sAvailable) {
dprintf("malloc(): Out of memory!\n");
dprintf("malloc(): Out of memory allocating a block of %ld bytes, "
"only %ld left!\n", size, sAvailable);
return NULL;
}
@@ -473,7 +474,8 @@ malloc(size_t size)
if (chunk == NULL) {
// could not find a free chunk as large as needed
dprintf("malloc(): Out of memory!\n");
dprintf("malloc(): Out of memory allocating a block of %ld bytes, "
"no free chunks!\n", size);
return NULL;
}