diff options
Diffstat (limited to '')
| -rw-r--r-- | miasm2/os_dep/common.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/miasm2/os_dep/common.py b/miasm2/os_dep/common.py index 7f8caed1..b7eb656a 100644 --- a/miasm2/os_dep/common.py +++ b/miasm2/os_dep/common.py @@ -60,9 +60,15 @@ class heap(object): @jitter: a jitter instance @size: the size to allocate """ + return self.vm_alloc(jitter.vm, size) + def vm_alloc(self, vm, size): + """ + @vm: a VmMngr instance + @size: the size to allocate + """ addr = self.next_addr(size) - jitter.vm.add_memory_page(addr, PAGE_READ | PAGE_WRITE, "\x00" * size) + vm.add_memory_page(addr, PAGE_READ | PAGE_WRITE, "\x00" * size) return addr |