Fixing log_heap printing a bit, though damn this stuff is nasty.

This commit is contained in:
Ben Vanik 2014-01-12 15:43:54 -08:00
parent f6866098c5
commit d224dd94c1
2 changed files with 4 additions and 2 deletions

View File

@ -587,13 +587,13 @@ void XenonMemoryHeap::DumpHandler(
(uint32_t)(start_addr - (uintptr_t)memory->mapping_base_);
uint32_t guest_end =
(uint32_t)(end_addr - (uintptr_t)memory->mapping_base_);
if (used_bytes > 0) {
if (int32_t(end_addr - start_addr) > 0) {
XELOGI(" - %.8X-%.8X (%10db) %.16llX-%.16llX - %9db used",
guest_start, guest_end, (guest_end - guest_start),
start_addr, end_addr,
used_bytes);
} else {
XELOGI(" - %.16llX-%.16llX - %9db used",
start_addr, end_addr, used_bytes);
start, end, used_bytes);
}
}

View File

@ -73,6 +73,8 @@ X_STATUS xeNtAllocateVirtualMemory(
// already happened.
if (*base_addr_ptr) {
// Having a pointer already means that this is likely a follow-on COMMIT.
XEASSERT(!(allocation_type & X_MEM_RESERVE) &&
(allocation_type & X_MEM_COMMIT));
return X_STATUS_SUCCESS;
}