Note that there are some explanatory texts on larger screens.

plurals
  1. POHow do I lower the amount of memory IOKit reserves at process start up?
    primarykey
    data
    text
    <p>I am a developer working on a very large, memory intensive 32bit application. Running out of virtual address space (memory) is a problem for us. During my investigation of some recent issues I noticed a large chunk of memory that is reserved by IOKit (512MB). This memory isn't allocated, but only reserved. Further investigation showed that most applications (Safari, iTunes etc) all reserve this chunk of memory as well. It seems to stay unallocated. I am using vmmap to test. For example, here is a Cocoa application made with XCode, using the default template:</p> <pre><code>REGION TYPE VIRTUAL =========== ======= CG backing stores 1008K CG image 4K CG raster data 64K CG shared images 2252K Carbon 7264K CoreGraphics 16K IOKit (reserved) 512.0M reserved VM address space (unallocated) MALLOC 59.0M see MALLOC ZONE table below MALLOC guard page 48K MALLOC metadata 348K Memory tag=242 12K STACK GUARD 56.0M Stack 8712K VM_ALLOCATE 16.2M __DATA 8296K __IMAGE 1240K __LINKEDIT 31.5M __TEXT 76.7M __UNICODE 536K mapped file 27.4M shared memory 1320K =========== ======= TOTAL 809.2M TOTAL, minus reserved VM space 297.2M </code></pre> <p>Is there anything I can do to reduce or eliminate that pool of memory? Our application could really use that 512MB!!!</p> <p>EDIT: I did some more research and it seems that this chunk of memory is the video card framebuffer being mapped into user space. So I guess a more accurate question is if there is anyway to limit framebuffer taking over such a large part of user mode virtual address space?</p> <p>EDIT: Did some further testing, and found the key that needs to change is IOFBMemorySize. As shown if you do this command:</p> <pre><code>ioreg -l | grep IOFBMemorySize </code></pre> <p>Or you can see it in the IORegistryExplorer. I have been unsuccessful in changing that value though. I tried adding it to the Info.plist for the ATIFramebuffer.kext, no good. I tried writing a program that calls IOConnectSetCFProperty, but it returned kIOReturnUnsupported.</p> <p>EDIT: After more research, seems like this IOFBMemorySize key is likely read only, simply reporting the amount of memory available on the video card. There looked to be some interesting values in the Configuration.plist for CoreGraphics, but none of them seemed to affect the memory allocation (even after a reboot).</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload