Commit 28baeeb9 authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

mmap has improved

parent 6764fda5
......@@ -38,8 +38,9 @@ if (writeMode):
with open("/dev/mem", "r+b") as f:
page_addr=addr & (~(PAGE_SIZE-1))
if (page_addr>=0x80000000):
page_addr-= (1<<32)
#in python 2.7.11 works w/o negation
#if (page_addr>=0x80000000):
# page_addr-= (1<<32)
mm = mmap.mmap(f.fileno(), PAGE_SIZE, offset=page_addr)
if writeMode:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment