sbrk on Windows
I'm toying with my own implementations of malloc and free. What is the equivalent of sbrk on Windows, i.e. how do I get more memory from the operating system during runtime?
The closest equivalent interface on that level would be the VirtualAlloc and VirtualFree functions - see how cygwin or this example map the semantics of sbrk to VirtualAlloc/Free.
The next level up from VirtualAlloc/Free is HeapAlloc/Free. I think you'd be better using this interface for your implementation instead.
The next level up from VirtualAlloc/Free is HeapAlloc/Free. I think you'd be better using this interface for your implementation instead.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement