I was reading the following story:
I'll keep my subjective opinion about the article to myself and will focus on the following:
I think that the use of the function 'sys._getframe()' mentioned in the article as a way to 'obtain a heap address' is 'misleading' .
Python gives away memory addresses all the time, there's no need to call a 'weird' function (sys._getframe() is not weird anyways):
(from http://shell.appspot.com/, but applicable to any python deployment):
>>> a = 'mythbusters'
frame object at 0xe81da54d1ff6afc8
both addresses are clearly in the same 'range', so I can infer they 'refer' to the same 'thing', if the 'thing' is the 'heap', then both methods 'leak' a heap address,
or more importantly, they 'leak' the same 'thing' :)
(on a windows machine)
>>> class a:
... def test(self):
... print 'hola'
>>> j = a()
__main__.a instance at 0x004AF0F8
frame object at 0x00475960
and finally (done at from http://shell.appspot.com/)
>>> import os
('Linux', '', '', '', '')
If you think I'm wrong, please comment!