Scribble memory when allocated
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user