|Jan 1, 2013, 06:09 AM||#1|
Using mmap() in OSX
I haven't found much information on Mac OSX's memory layout (who am I kidding, I haven't found a darn thing), so I was hoping that someone would be able to shed some light on this.
This is going to be a rather "off the wall" request, but I want to use mmap() to claim the first 4GB of the 64-bit address space in Mac OSX (more specifically, the memory range of 0x10000 - 0xFFFFFFFF). I'm assuming that it may be impossible to get access to that memory range. In Windows, I can at least get that specific base address with a few hacky methods, but I'm still rather new to MacOSX and UNIX altogether.
I was thinking of trying something like this:
void* memptr = (void*) 0x10000;
mmap( memptr, 0xFFFFFFFF, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_FIXED, -1, 0 );
Would this work?
|Thread Tools||Search this Thread|
All times are GMT -5. The time now is 04:56 PM.