diff --git a/OVMF/OVMF_VARS_4M.fd b/OVMF/OVMF_VARS_4M.fd index 664cb3b..d34bc6f 100644 Binary files a/OVMF/OVMF_VARS_4M.fd and b/OVMF/OVMF_VARS_4M.fd differ diff --git a/fatroot/EFI/Boot/BootX64.efi b/fatroot/EFI/Boot/BootX64.efi index 6456089..6b23adc 100644 Binary files a/fatroot/EFI/Boot/BootX64.efi and b/fatroot/EFI/Boot/BootX64.efi differ diff --git a/main.cpp b/main.cpp index 2a549f4..50cd1fe 100644 --- a/main.cpp +++ b/main.cpp @@ -117,7 +117,7 @@ static bool IsPointerInPool(void* ptr) { } void* Malloc(size_t size) { - PRINT(L"Allocating memory of size %ull\n", size); + PRINT(L"Allocating memory of size %llu, ptr = ", size); size = ALIGN_UP(size, AVX_ALIGN); // ensure AVX alignment struct BlockHeader* best = 0; struct BlockHeader* bestPrev = 0; @@ -136,6 +136,7 @@ void* Malloc(size_t size) { } if (!best) { + PRINT(L"NULL\n"); return 0; } @@ -145,6 +146,7 @@ void* Malloc(size_t size) { size_t totalNeeded = size + padding; if (best->size < totalNeeded) { + PRINT(L"NULL not enough space\n"); return 0; // not enough space } @@ -163,6 +165,7 @@ void* Malloc(size_t size) { best->free = false; best->size = totalNeeded; + PRINT(L"%p\n", (void*)alignedAddr); return (void*)alignedAddr; }