3 ms·
I wasn't talking about web applications, and modern garbage collectors are not stop-the-world. Not to mention ... stop-the-world garbage collectors have a good
by bad_user 16y ago
I wasn't talking about web applications, and modern garbage collectors are not stop-the-world.
Not to mention ... stop-the-world garbage collectors have a good reason for doing what they do. They are defragmenting the memory. You get that for free, when in C++ you would have to deal with hell if your app is doing lots of allocations ... see the shit the Firefox devs had to go through to alleviate the problems of heap fragmentation, and its still a problem.
- heresy 16y agoAh, but what, you're using both managed code (C#) and unmanaged code (C++) in the same address space, doing memory intensive work using third party proprietary C++ code that does lots of small allocations? In 32-bit land, it's welcome to OutOfMemoryException because managed code can't allocate a big enough chunk when returning to C#. No free lunch :) Either recycle processes often or reserve big enough contiguous chunks in managed code before calling out to the bad C++ code, no amount of good citizenship in managed code will stop the poorly written native code from fragmenting the hell out of your address space.
- gaius 16y agoUnfortunately we don't all have the luxury of rewriting all our code in the trendy language du jour.