views:

133

answers:

1

... like how many memory consumed by what / how many objects, as in JVM heap dump file. Our service process is consuming remarkable memory, which is being complained by others living in a same OS.

The applications structure is weird, it leveraged reverse JNI to call java interface from c++ code, also it's a network application, all these make it almost impossible to use tools like valgrind or purify.

Any suggestion would be appriciated.

A: 

You could overload new/delete and track memory usage that way.

graham.reeds
Considering the explicit mention of reverse JNI, this won't help at all.
MSalters
Thank Graham, another problem shows up tho, seems the overloaded new/delete operators cannot be declared within a name space, in that case how could the application see them in their own name space?
Ripley
@MSalters: It seemed to me that unknown was allocating memory in C++ and then passing those objects to the Java process.
graham.reeds