News for hackers. Stuff that matters.
Re:Zed Shaw on C++ by bad_user on Friday July 16, 2010 @06:54AM (#1520809)
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.

Re:Zed Shaw on C++ by heresy on Friday July 16, 2010 @08:24AM (#1520895)
Ah, 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.

Re:Zed Shaw on C++ by gaius on Friday July 16, 2010 @09:37AM (#1521073)
Unfortunately we don't all have the luxury of rewriting all our code in the trendy language du jour.