VirtualProtect platform abstraction.

This commit is contained in:
Ben Vanik
2015-07-15 18:20:05 -07:00
parent 99104a25a8
commit 58c3a1ba79
11 changed files with 155 additions and 56 deletions

View File

@@ -52,7 +52,8 @@ ThreadState::ThreadState(Processor* processor, uint32_t thread_id,
// only Protect() on system page granularity.
stack_size = (stack_size + 0xFFF) & 0xFFFFF000;
uint32_t stack_alignment = (stack_size & 0xF000) ? 0x1000 : 0x10000;
uint32_t stack_padding = uint32_t(xe::page_size()); // Host page size.
uint32_t stack_padding =
uint32_t(xe::memory::page_size()); // Host page size.
uint32_t actual_stack_size = stack_padding + stack_size;
bool top_down;
switch (stack_type) {