Re: memory warnings
Re: memory warnings
- Subject: Re: memory warnings
- From: Jens Alfke <email@hidden>
- Date: Wed, 12 Mar 2008 12:53:59 -0700
On 12 Mar '08, at 11:00 AM, John Stiles wrote:
You can dive into BSD to get some values which might help you.
I'm not an expert on this, but I've listened in on email threads where
OS X kernel engineers were giving answers.
Trying to preflight memory allocations is, basically, not feasible.
Your process's address space gets fragmented, so just because X amount
is free doesn't mean an attempt to allocate X will succeed.
Going 64-bit will keep you from running out of address space. (The
next limit you hit will probably be when the app's working set exceeds
available physical RAM, and the system will start to thrash like
crazy. After that, you might fill up the hard drive and run out of
swap space, in which case you'll crash.)
If the data you're manipulating comes directly from files, try to
memory-map them instead of copying the contents into your heap. That
can really help.
—Jens
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden