The Windows malloc() implementation from MSVCRT is slow
erikmcclure.com
The Windows malloc() implementation from MSVCRT is slow
1–10 of 187 posts
Re: The Windows malloc() implementation from MSVCRT is slow
#2In that environment I can imagine nobody wants to be on the hook for messing with something fundamental like malloc().
The complete trash fire that is O365 and Teams—for some reason the new Outlook kicks you out to a web app just to manage your todos—suggests to me that Microsoft may be suffering from a development culture that’s more focused on people protecting fiefdoms than delivering the best product. I saw this with Nortel before it went under. It was so sclerotic that they would outsource software development for their own products to third party development shops because there was too much internal politics to execute them in house.
Re: The Windows malloc() implementation from MSVCRT is slow
#3It's poorly documented, so I can't find a reference explaining what it is on MSDN save for a snippet on the page about the app manifests[1]. There's some better third-party "documentation"[2] that gets into some specifics of how it works, but even that is light on the real-world operational details that would be helpful here.
Chrome tried it out and found[3] it to be less than suitable due to its increased CPU cost, which might presage what Erik would see if they enabled it.
[1] https://docs.microsoft.com/en-us/windows/win32/sbscs/applica...
[2] (PDF warning) https://www.blackhat.com/docs/us-16/materials/us-16-Yason-Wi...
[3] https://bugs.chromium.org/p/chromium/issues/detail?id=110228...
Re: The Windows malloc() implementation from MSVCRT is slow
#4Re: The Windows malloc() implementation from MSVCRT is slow
#5Re: The Windows malloc() implementation from MSVCRT is slow
#6Re: The Windows malloc() implementation from MSVCRT is slow
#7MSVCRT basically just exists for backwards compatibility. It's impossible to improve this library at this point.
Re: The Windows malloc() implementation from MSVCRT is slow
#8Where do people get their opinions from? It seems like opinions now spread like memes - someone you respect/has done something in the world says it, you repeat it without verifying any of their points. It seems like gamedev has the highest "C++ bad and we should all program in C" commmunity out there.
If you want a good malloc impl just use tcmalloc or jemalloc and be done with it
Re: The Windows malloc() implementation from MSVCRT is slow
#9Has everyone forgotten that Unix is the common ancestor of Linux and every other Unixlike? I’m seeing an uptick of people writing nonsensical comments like “this was written for Linux (or Mac OS X, which implements POSIX and is therefore really Linux in drag)”.
Re: The Windows malloc() implementation from MSVCRT is slow
#10> I was taught that to allocate memory was to summon death itself to ruin your performance. A single call to malloc() during any frame is likely to render your game unplayable. Any sort of allocations that needed to happen with any regularity required writing a custom, purpose-built allocator, usually either a fixed-size block allocator using a freelist, or a greedy allocator freed after the level ended. Where do peo…