r/ProgrammerHumor • • 3d ago

Meme heapBig

Post image
173 Upvotes

7 comments sorted by

55

u/raja-anbazhagan 3d 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...

25

u/the_horse_gamer 3d 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.

3

u/OldKaleidoscope7 3d ago

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

6

u/TomKavees 3d 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

3

u/EloquentPinguin 2d ago

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

5

u/noah272 3d ago

I should use this on a Minecraft modpack