On Dec 12, 2008, at 3:51 AM, Thomas Clement wrote:

I'm using NSBitmapImageRep to build a new image by doing some pixel processing (which unfortunately I can't do using Core Image). Everything works great but with bigger sizes I'm getting a malloc error when calling - [NSBitmapImageRep tiffRepresentation] (error 12: Can't allocate memory). I'm using this method at the end of my processing to write the data to disk.

I guess I'm running out of memory and the allocation fails which is rather surprising since I have plenty of disk space for virtual memory.
How should I work around this problem?


How big are your images? You still only have 4GB of virtual address space (and less actual and contiguous space) so if your using a significant portion of it, then malloc()s for large chunks of memory (like a method such as -TIFFRepresentation might require) are likely to fail.
--
David Duncan
Apple DTS Animation and Printing

_______________________________________________

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 arch...@mail-archive.com

Reply via email to