Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Snow Leopard Memory Management



I have boot-args debugging turned on but I haven't noticed any additional messages. 

The system does not panic. I am catch the situation and return an error. But this is still a situation we would like to avoid.

I think I understand what you're saying about the physical addresses. Just to make sure, one failure mode is sending a request via the user client interface. The request includes an address that is to be mapped into kernel space but the address is in user space. So, it's not a "real" memory situation, but just having space to map the virtual memory. Seems like that was what you are saying.

The odd thing is that waiting for some time seems to clear this up. It seems like virtual memory addresses are slow to be recovered (shades of the old Mac memory manager purge cycle).

Thanks for any tips,
 ...Duane

On Oct 28, 2009, at 9:55 PM, Michael Smith wrote:

Duane,

Is anything printed on the console when you encounter this problem?  Consider turning kprintf (boot-args=0x14e is over the top but will do the job) on.

Also, if you panic the system and attach with gdb, the output of 'zprint' from kgmacros may help identify the issue.

IOMemoryDescriptors that reference kernel memory are auto-prepared, so your size sensitivity is probably due to running out of space to store the physical addresses.

 = Mike

On Oct 28, 2009, at 9:42 PM, Duane Murphy wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

I'm wondering if there have been significant changes to the memory  
manager on Snow Leopard?

We are seeing situations where the kernel is running out of memory. If  
the system remains idle for some period of time, then more memory  
becomes available or at least more virtual memory space becomes  
available (this is in K32).

For example, IOMemoryDescriptor::withAddress( buffer, bufferSize,  
kIODirectionIn) will fail for 32K but will work for 512 bytes. After  
some period of time, the 32K will begin to work again.

We haven't seen these same sort of issues in Leopard.

Is there something we should be doing differently to manage memory in  
the kernel?

 ...Duane
ps
Yes, I will be doing a search for leaks. :-)



-----BEGIN PGP SIGNATURE-----
Version: PGP Desktop 9.10.0 (Build 500)
Charset: US-ASCII

wsBVAwUBSukdIUrg9acQ4r2CAQiDhwgA0yFUVCJRgguFC+9fXD16rLE1T51lrMnt
jmme2nSGy8pupvkslHV0uI1P/LaZJfN5RAvA7IvH2tNLIWweeOA0zy+VBGPiPRuv
m44JY1S7DJv399R9Jp45Sc9oer1JxMm2C8o9TxUxDrDrYuXcxHQY7WOhP9KmSskY
BqAjJn37J70khjtQMJ9HPONW4rA3am+xmcCnDwfONlOWyMgx4hkRtgEYubkA+MSl
hSOFEhLl0ywqheEm8xTSyGBl+aQzPEZgc5mvLomWvTIfoZe5Sk8G/PTCgdW5Gcvx
JpybbUs0DVqZlw1vXk2YBLeLRa4zws9Hx8dmSZSnmojls6RL+DP2Sg==
=PaaA
-----END PGP SIGNATURE-----
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-kernel/email@hidden

This email sent to email@hidden

--
Ars longa, vita brevis, occasio praeceps, experimentum periculosum, iudicium difficile -- Hippocrates







 ...Duane



Attachment: PGP.sig
Description: PGP signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-kernel/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.