vm/allot.hpp: Print more room info when allot() fails.

This is to help debug win64.

Some interesting observations:

fails without any error:
factor.com -codeheap=74000

fails with VirtualAlloc error:
factor.com -codeheap=80000
master
Doug Coleman 2020-03-10 03:31:23 -05:00
parent 96d3482475
commit fcc225466f
1 changed files with 4 additions and 3 deletions

View File

@ -20,9 +20,10 @@ inline code_block* factor_vm::allot_code_block(cell size,
// Insufficient room even after code GC, give up // Insufficient room even after code GC, give up
if (block == NULL) { if (block == NULL) {
std::cout << "Code heap used: " << code->allocator->occupied_space() std::cout << "Code heap used: " << code->allocator->occupied_space() << "\n";
<< "\n"; std::cout << "Code heap free: " << code->allocator->free_space << "\n";
std::cout << "Code heap free: " << code->allocator->free_space << "\n"; std::cout << "Code heap free_block_count: " << code->allocator->free_block_count << "\n";
std::cout << "Code heap largest_free_block: " << code->allocator->largest_free_block() << "\n";
std::cout << "Request : " << block_size << "\n"; std::cout << "Request : " << block_size << "\n";
fatal_error("Out of memory in allot_code_block", 0); fatal_error("Out of memory in allot_code_block", 0);
} }