added getTotalSharedMem et al.

I'm new to this, so please check that the code makes sense.

Also, i don't entirely grok the numbers -- for instance, allocating 2 bytes does not necessarily grow the result of getOccupiedSharedMem() by two, but could just as well increase it by 4096. I'm guessing this has to do with the allocator implementation, which i didn't read, but it's a little confusing to me what exactly the numbers mean.