mirror of
https://github.com/xenia-project/xenia.git
synced 2026-04-20 22:13:40 +00:00
Scribble memory when allocated
This commit is contained in:
parent
da630cc159
commit
6adde32558
1 changed files with 8 additions and 0 deletions
|
|
@ -596,6 +596,10 @@ bool BaseHeap::AllocFixed(uint32_t base_address, uint32_t size,
|
|||
XELOGE("BaseHeap::Alloc failed to alloc range from host");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (FLAGS_scribble_heap && protect & kMemoryProtectWrite) {
|
||||
memset(result, 0xCD, page_count * page_size_);
|
||||
}
|
||||
}
|
||||
|
||||
// Set page state.
|
||||
|
|
@ -725,6 +729,10 @@ bool BaseHeap::AllocRange(uint32_t low_address, uint32_t high_address,
|
|||
XELOGE("BaseHeap::Alloc failed to alloc range from host");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (FLAGS_scribble_heap && protect & kMemoryProtectWrite) {
|
||||
memset(result, 0xCD, page_count * page_size_);
|
||||
}
|
||||
}
|
||||
|
||||
// Set page state.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue