c - How to get the number of the instances of a struct existing in a running Linux kernel? -


suppose struct a structure of linux kernel code, , there may many instances of struct a being created , destroyed in running linux kernel, how can know number of instances of struct a existing right now?

in general can't, unless can see structure instantiated in single way (if there constructor/factory function).

for structures used on stack, there typically no such function (although it's possible since structure instances can returned values).

c doesn't provide way automatically, you'd have build require finding places instances created.


Comments

Popular posts from this blog

PHP while loop dynamic rowspan -

timer - Java TimerTask cancel -

android - How to read a column value in parse.com without accessing an object or a pointer -