about summary refs log tree commit diff stats
path: root/test/analysis/mem.py
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 /test/analysis/mem.py
parenta03c4cb22a2bdaefe19ab2908dc55894211e5070 (diff)
downloadmiasm-e53ac5b2a65f79d6342b1820c68efc126c8e4986.tar.gz
miasm-e53ac5b2a65f79d6342b1820c68efc126c8e4986.zip
MemStruct: minor fixes + toy example script
Diffstat (limited to '')
-rw-r--r--test/analysis/mem.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/test/analysis/mem.py b/test/analysis/mem.py
index d9fe889c..9eba8fca 100644
--- a/test/analysis/mem.py
+++ b/test/analysis/mem.py
@@ -5,11 +5,10 @@
 import struct
 
 from miasm2.analysis.machine import Machine
-import miasm2.analysis.mem as mem_module
 from miasm2.analysis.mem import MemStruct, Num, Ptr, MemStr, MemArray,\
                                 MemSizedArray, Array, mem_array_type,\
                                 mem_sized_array_type, Struct, Inline, mem,\
-                                Union, BitField, MemSelf, MemVoid
+                                Union, BitField, MemSelf, MemVoid, set_allocator
 from miasm2.jitter.csts import PAGE_READ, PAGE_WRITE
 from miasm2.os_dep.common import heap
 
@@ -74,7 +73,7 @@ assert mstruct.i == 0x11111111
 
 # From now, just use heap.vm_alloc
 my_heap = heap()
-mem_module.allocator = my_heap.vm_alloc
+set_allocator(my_heap.vm_alloc)
 
 
 # Ptr tests
@@ -445,4 +444,4 @@ print repr(memsarray)
 print repr(memstr)
 print repr(memstr3)
 
-print "Ok" # That's all folks!
+print "\nOk" # That's all folks!