|
|
|
|
|
by barrkel
1454 days ago
|
|
VirtualAlloc is a better base for a custom memory allocator. It's closer to mmap + mprotect in functionality. There's also CoTaskMemAlloc (aka IMalloc::Alloc). And COM automation has a bunch of methods which allocate memory for dynamically sized data, which could be abused for memory allocation - SafeArrayCreate, SysAllocString. |
|
(Not to say malloc is a perfect API, it’s definitely oversimplified, but they probably didn’t solve any of its problems.)