Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old Jan 1, 2013, 06:09 AM   #1
blueshogun96
macrumors newbie
 
Join Date: Nov 2012
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?
blueshogun96 is offline   0 Reply With Quote

 
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 12:43 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC