Python Interpreter for Ghidra
Based on Jython version 2.7.1 (default:0df7adb1b397, Jun 30 2017, 19:02:43)
[Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)]
Press 'F1' for usage instructions
>>>
>>> mem = currentProgram.getMemory()
>>> for block in mem.getBlocks():
... print block.getName() + ", " + hex(block.getSize())
...
Headers, 0x400L
.textbss, 0x10000L
.text, 0x4b57L
.rdata, 0x1ed6L
.data, 0x200L
.data, 0x384L
.idata, 0x8b7L
.rsrc, 0x1b4L
.reloc, 0x48fL