Fixing log_heap printing a bit, though damn this stuff is nasty.
This commit is contained in:
parent
f6866098c5
commit
d224dd94c1
|
@ -587,13 +587,13 @@ void XenonMemoryHeap::DumpHandler(
|
||||||
(uint32_t)(start_addr - (uintptr_t)memory->mapping_base_);
|
(uint32_t)(start_addr - (uintptr_t)memory->mapping_base_);
|
||||||
uint32_t guest_end =
|
uint32_t guest_end =
|
||||||
(uint32_t)(end_addr - (uintptr_t)memory->mapping_base_);
|
(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",
|
XELOGI(" - %.8X-%.8X (%10db) %.16llX-%.16llX - %9db used",
|
||||||
guest_start, guest_end, (guest_end - guest_start),
|
guest_start, guest_end, (guest_end - guest_start),
|
||||||
start_addr, end_addr,
|
start_addr, end_addr,
|
||||||
used_bytes);
|
used_bytes);
|
||||||
} else {
|
} else {
|
||||||
XELOGI(" - %.16llX-%.16llX - %9db used",
|
XELOGI(" - %.16llX-%.16llX - %9db used",
|
||||||
start_addr, end_addr, used_bytes);
|
start, end, used_bytes);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,6 +73,8 @@ X_STATUS xeNtAllocateVirtualMemory(
|
||||||
// already happened.
|
// already happened.
|
||||||
if (*base_addr_ptr) {
|
if (*base_addr_ptr) {
|
||||||
// Having a pointer already means that this is likely a follow-on COMMIT.
|
// 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;
|
return X_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue