Quote:Original post by TerefereConsidering malloc has substantially more debugging available for a minute speed hit, I really don't think HeapAlloc is viable.
How about allocations, considering speed on Windows only. HeapAlloc or malloc?
You're really not taking things into perspective here - you're gaining a few cycles, a few tens or hundred at best. That's going to save you a fraction of a microsecond, which it's really not worth considering the portability and debugging you'll lose. What happens when you find you want to track all allocations to catch memory leaks in debug builds? You'll have to write your own memory manager which will do the exact same job of malloc.
If you do insist on doing this, then why stop there? Why not write a driver to bypass the OS memory allocation functions all together?