diff --git a/photon/libc/sys/horizon/heap.c b/photon/libc/sys/horizon/heap.c index 33a3fd4..c7b0090 100644 --- a/photon/libc/sys/horizon/heap.c +++ b/photon/libc/sys/horizon/heap.c @@ -30,6 +30,7 @@ void __crt_heap_init(size_t sz) MX_VM_CAN_MAP_READ | MX_VM_CAN_MAP_WRITE | MX_VM_CAN_MAP_SPECIFIC, 0, HEAP_REGION_SZ, &heap_vmar, &heap); if (status != MX_OK) { + fprintf(stderr, "fatal: cannot allocate heap virtual region (%s)\n", mx_status_to_string(status)); abort(); } @@ -38,6 +39,7 @@ void __crt_heap_init(size_t sz) MX_VM_CAN_MAP_READ | MX_VM_CAN_MAP_WRITE | MX_VM_CAN_MAP_SPECIFIC, &heap_vmo); if (status != MX_OK) { + fprintf(stderr, "fatal: cannot allocate heap (%s)\n", mx_status_to_string(status)); abort(); } @@ -46,6 +48,7 @@ void __crt_heap_init(size_t sz) 0, heap_vmo, 0, sz, &heap); if (status != MX_OK) { + fprintf(stderr, "fatal: cannot map heap (%s)\n", mx_status_to_string(status)); abort(); } @@ -84,7 +87,7 @@ void *__crt_heap_extend(size_t sz) offset, heap_vmo, heap_sz, sz, &alloc_base); if (err != MX_OK) { - printf("cannot map extended heap: %s\n", mx_status_to_string(err)); + fprintf(stderr, "fatal: cannot map extended heap (%s)\n", mx_status_to_string(err)); abort(); }