Obeying request to zero.

This commit is contained in:
Ben Vanik
2013-10-27 12:47:00 -07:00
parent 6477d6c21e
commit 11f99ce33b
2 changed files with 3 additions and 2 deletions

View File

@@ -527,7 +527,8 @@ uint32_t xe_memory_heap_t::Alloc(
PAGE_READWRITE);
}
if (FLAGS_scribble_heap) {
if ((flags & X_MEM_NOZERO) &&
FLAGS_scribble_heap) {
// Trash the memory so that we can see bad read-before-write bugs easier.
memset(p, 0xCD, alloc_size);
}