C version of mmap allocation

Laying out the call in C before writing the ASM simplifies things.