G
Gennady Bystritsky
What would be a good way to determine the current heap size (VSZ) for a pro=
cess on Linux?
I always used sbrk(0) for that, which used to return the top of the heap. H=
owever recently, to my dismay, I discovered that it does not work on Linux =
-- I successfully malloc()-ed 1GB, could confirm it with "ps -o pid,vsz,arg=
s", and yet sbrk(0) always returns the same value as right in the beginning=
cess on Linux?
I always used sbrk(0) for that, which used to return the top of the heap. H=
owever recently, to my dismay, I discovered that it does not work on Linux =
-- I successfully malloc()-ed 1GB, could confirm it with "ps -o pid,vsz,arg=
s", and yet sbrk(0) always returns the same value as right in the beginning=