-
-
Notifications
You must be signed in to change notification settings - Fork 3
Memory usage
Please note: I have not done any benchmarks, these are just my calculations. I have also not factored the Java overhead into my calculations, so the memory usage will probably be slightly higher.
What you need to know beforehand:
The JVM stores a single Java byte using 4 "real" bytes in memory.¹ (This of course depends on the JVM you're using)
The graphics buffer of a ClientsideMap
holds 128*128 Java bytes. This roughly equates to 64 KB of memory usage.
A MapScreen
is built using an array of width*height
ClientsideMap
s, so it takes up width*height*128*128
of Java bytes. This equates to a memory usage of 2048 KB (2 MB) for a 8*4 MapScreen
.
If you now enable the Advanced Content Change optimization algorithm, a MapScreen
will double its usual memory usage. (4096 KB or 4 MB for a 8*4 MapScreen
)
- Getting started
- Core classes
- Other
- Examples
- Javadocs
- Concepts
- (Outdated)
"Dirty" maps - (Outdated)
The Advanced Content Change Algorithm
- (Outdated)
- Other
- (Outdated)
Memory usage
- (Outdated)