Skip to content

Commit

Permalink
Reformatting and show gaps
Browse files Browse the repository at this point in the history
  • Loading branch information
jabriffa committed Jun 14, 2018
1 parent e112d52 commit 2f7aa53
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cr2_memorymap.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,12 @@ def main():
# display memory map
mmap = tiff.get_memorymap()
print "*** Memory Map ***"
next_offset = 0
for offset, length, description in sorted(mmap):
print "%8d - %8d\t%8d\t%s" % (offset, offset+length-1, length, description)
if offset > next_offset:
print "*%8d - %8d\t%8d" % (next_offset, offset-1, offset-next_offset)
print " %8d - %8d\t%8d\t%s" % (offset, offset+length-1, length, description)
next_offset = offset + length
print "*** END ***"

return
Expand Down

0 comments on commit 2f7aa53

Please sign in to comment.