about summary refs log tree commit diff stats
path: root/miasm2
diff options
context:
space:
mode:
authorFlorent Monjalet <florent.monjalet@gmail.com>2015-11-08 21:27:40 +0100
committerFlorent Monjalet <florent.monjalet@gmail.com>2016-01-18 14:02:31 +0100
commite53ac5b2a65f79d6342b1820c68efc126c8e4986 (patch)
tree072e60a420d05ce80902ee86d3a11ed00e0d7960 /miasm2
parenta03c4cb22a2bdaefe19ab2908dc55894211e5070 (diff)
downloadmiasm-e53ac5b2a65f79d6342b1820c68efc126c8e4986.tar.gz
miasm-e53ac5b2a65f79d6342b1820c68efc126c8e4986.zip
MemStruct: minor fixes + toy example script
Diffstat (limited to 'miasm2')
-rw-r--r--miasm2/analysis/mem.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/miasm2/analysis/mem.py b/miasm2/analysis/mem.py
index 057f7a37..a42df7ba 100644
--- a/miasm2/analysis/mem.py
+++ b/miasm2/analysis/mem.py
@@ -10,6 +10,11 @@ log.setLevel(logging.WARN)
 # allocator is a function(vm, size) -> allocated_address
 allocator = None
 
+def set_allocator(alloc_func):
+    global allocator
+    allocator = alloc_func
+
+
 # Helpers
 
 def indent(s, size=4):