POSIX: allocate 64KB on 64KB boundary.

Posted by Eloff on Stack Overflow See other posts from Stack Overflow or by Eloff
Published on 2010-05-23T08:02:54Z Indexed on 2010/05/23 8:10 UTC
Read the original article Hit count: 281

Filed under:
|
|

I would really like to actually only allocate 64KB of memory, not 128KB and then do the alignment manually - far too wasteful. VirtualAlloc on windows gives precisely this behavior. Supposedly there's code in SquirrelFish for doing this on just about every platform, but I haven't managed to locate it. Is there a space efficient way to allocate 64KB on a 64KB boundary in POSIX? Failing that, in Linux?

© Stack Overflow or respective owner

Related posts about c

    Related posts about linux