4 ms·
It’s surprising GC isn’t mentioned once. That was always the thing to fight for decent UX in modded minecraft. Leaky mods could lead to (what this article ref
by willis936 6y ago
It’s surprising GC isn’t mentioned once. That was always the thing to fight for decent UX in modded minecraft. Leaky mods could lead to (what this article refers to as) lag spikes as long as 40 seconds when the GC triggered (once a minute with tuned GC settings).
- pjmlp 6y agoBecause most likely it was more an issue of who wrote them than the quality of the GC.
- willis936 6y agoThe presence of a GC is an enabler for bad coding. If the code wasn’t running in a VM then you couldn’t play a mod with a memory leak that bad. It would just crash, as it should.
- pjmlp 6y agoMemory corruption exploitation in C is a proof that no, it doesn't crash, only if you get lucky.
- willis936 6y agoAllocating memory when there is no available addresses does not reliably result in a seg fault in C?
- pjmlp 6y agoNot at, depends on the OS. It should return NULL, but not necessarly depending on the OS. For example in Linux it will always return a pointer to memory that is yet to be allocated, it is when you touch the memory for the first time that Linux via the MMU trap, then goes around and actually makes the memory segment available, by then it is too late if the system is running low on memory. https://man7.org/linux/man-pages/man3/malloc.3.html https://man7.org/linux/man-pages/man3/malloc.3.html That is why there is such a thing as OOM daemon on Linux. Secondly, memory leaks like those caused by double free lead to the corruption of the memory allocator, thus whatever happens depends pretty much on the implementation being used.