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: Why does free() take 1,100 microseconds?




Am 27.07.2005 um 16:22 schrieb John Francini:

The earlier lines of discussion made it obvious that this application needs to have near-real-time levels of predictable response. Having the OS decide to page on you when you really don't want it to do so doesn't help, and makes the platform look like it's inhospitable to real-time use.

Darwin is quite capable of handling near realtime demands, even without hackery.


The OS pages when there is insufficient physical memory, only, of course. If it does, it tries to page out stuff which wasn't used for the longest time. So, if your app data gets paged, it either wasn't used/touched for a long time or memory is really tight. In both situations you shouldn't modify the default behaviour.

If you want to make fairly sure some portion of data isn't the next candidate to be swapped, "touch" it by reading a few bytes from each page. Only touch data you expect to be used soon, of course.


Especially, if you handle some 500 MB of data. Totally inappropriate to wire down such amounts.



Cheers, Markus

- - - - - - - - - - - - - - - - - - -
Dipl. Ing. Markus Hitter
http://www.jump-ing.de/




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

This email sent to email@hidden
References: 
 >Re: Why does free() take 1,100 microseconds? (From: "neal olander" <email@hidden>)
 >Re: Why does free() take 1,100 microseconds? (From: Jan Brittenson <email@hidden>)
 >Re: Why does free() take 1,100 microseconds? (From: Markus Hitter <email@hidden>)
 >Re: Why does free() take 1,100 microseconds? (From: John Francini <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.