Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Java
Memory allocation
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Kai Schwebke, post: 2917308"] boolean[n] consumes (most likely) c + n bytes. boolean[n][4] is one array of n references to n arrays of 4 bytes. Arrays are instances of class Array and consume (most likely) from 12 to 16 bytes{1}. The reference may need additional 4 bytes. All of this n times, leading to a quite high overhead. You may consider using a bitset and a calculated index (e.g. index = 4*a + b) to reduce the required heap space to c + n/8 bytes. Kai {1} see [URL]http://martin.nobilitas.com/java/sizeof.html[/URL] [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Java
Memory allocation
Top