Thursday, 15 August 2013

What is the memory footprint of a method intensive Java object? -


Let's say I have a Java class that has a 100 code worth of code that does not have any variable, but only has 20 byte attributes.

I instantiate 1,000 objects from this class.

Did I consume 100,000 memory? Or only 100K + (20bytes * 1000)? Or something else?

The memory footprint will almost correspond to the code size to load the square, but each frequency The code for will not be duplicated. For an example, the frequency characteristics will require a lot of memory + some overhead for the management of the object instance.


No comments:

Post a Comment