Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java memory guideline

Likely a dumb question but..

Are there any good guidelines for how much memory basic Java data structures will consume?

Ie: How much memory will be consumed by a simple POJO with an int member and a String member (say that holds a 10 char String)? How much memory would be consumed by a List of 10 of said objects?

etc

like image 988
Marcus Leon Avatar asked Jan 11 '10 21:01

Marcus Leon


1 Answers

RAM Footprint
http://java.sun.com/docs/books/performance/1st_edition/html/JPRAMFootprint.fm.html

String/Object Memory Usage
http://www.javamex.com/tutorials/memory/string_memory_usage.shtml

like image 98
Robert Greiner Avatar answered Nov 15 '22 02:11

Robert Greiner