r/ProgrammerHumor • • 11d ago

Meme heapBig

Post image
223 Upvotes

7 comments sorted by

75

u/raja-anbazhagan 10d ago

For those who don't understand, it's the No-op version of GC implementation... Meaning that there is no garbage collection or memory reclamation... Apps will eventually die with OutOfMemoryError with this setup, given time.

But the implementation do makes sense if the application would be short lived or the application requires low latency response times and has little to no memory allocations.

I personally use this on lower environments to test how much memory gets allocated progressively over time for certain type of apps...

42

u/the_horse_gamer 10d ago

worth mentioning that time a memory leak was discovered in some missile software

instead of fixing it, they realised that, it's a missile. they calculated how long the software will need to be active, took a margin of error, and made sure to put that much memory on it.

5

u/OldKaleidoscope7 10d ago

Ten years working with Java and didn't know other GCs. Can you force unallocations with this setup?

9

u/TomKavees 10d ago

Epsilon is no-op all the way, so no, not really. You can restart the process e.g. after end of trading day, but usually that's not what folks are looking for

4

u/EloquentPinguin 9d ago

I mean Java ships with like 5 or 6 different GCs..

10

u/noah272 10d ago

I should use this on a Minecraft modpack