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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to