Skip to content

Commit

Permalink
Locate function in MemoryMap
Browse files Browse the repository at this point in the history
  • Loading branch information
bdcht committed Oct 13, 2014
1 parent 0980883 commit 79f1e9b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions amoco/system/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,11 @@ def newzone(self,label):
z.rel = label
self._zones[label] = z

def locate(self,address):
r, a = self.reference(address)
idx = self._zones[r].locate(address)
return self._zones[r]._map[idx]

def reference(self,address):
if isinstance(address,(int,long)):
return (None,address)
Expand Down

0 comments on commit 79f1e9b

Please sign in to comment.