Zero memory on alloc.

This commit is contained in:
Ben Vanik
2013-10-22 21:50:10 -07:00
parent d065ee43e8
commit d9a55a5557
6 changed files with 33 additions and 19 deletions

View File

@@ -24,7 +24,8 @@ ThreadState::ThreadState(
thread_id_(thread_id) {
memory_ = processor->memory();
stack_address_ = xe_memory_heap_alloc(memory_, 0, stack_size, 0);
stack_address_ = xe_memory_heap_alloc(
memory_, 0, stack_size, XE_MEMORY_FLAG_ZERO);
// Allocate with 64b alignment.
ppc_state_ = (xe_ppc_state_t*)xe_malloc_aligned(sizeof(xe_ppc_state_t));