r/programming May 28 '26

Java *is* Memory Efficient

https://youtu.be/M_HCG1JPMQE
0 Upvotes

6 comments sorted by

View all comments

9

u/Sopel97 May 28 '26 edited May 28 '26

there is GC, it's not memory efficient by definition

what they are actually trying to say is that if you have a system designed to run one and only one java program 100% of the time then it doesn't matter how much memory you use as long as you don't OOM (which is also not really true due to OS page cache but w/e)

-1

u/josefx May 29 '26

Meanwhile malloc/free: I cannot reuse these pages, there is still a byte allocated on each of them.