From 7d6dda356c714b104c04cb5027141fee2c24e995 Mon Sep 17 00:00:00 2001 From: Ben Vanik Date: Sun, 27 Oct 2013 16:01:35 -0700 Subject: [PATCH] Clear all allocated memory. --- src/xenia/memory.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/xenia/memory.cc b/src/xenia/memory.cc index a4308997e..ddc1ca96d 100644 --- a/src/xenia/memory.cc +++ b/src/xenia/memory.cc @@ -531,6 +531,9 @@ uint32_t xe_memory_heap_t::Alloc( FLAGS_scribble_heap) { // Trash the memory so that we can see bad read-before-write bugs easier. memset(p, 0xCD, alloc_size); + } else { + // Implicit clear. + memset(p, 0, alloc_size); } return (uint32_t)((uintptr_t)p - (uintptr_t)memory->mapping_base);