memory management question
memory management question
- Subject: memory management question
- From: matt neuburg <email@hidden>
- Date: Thu, 18 Mar 2004 15:36:56 -0800
My app reads lots of TIFFs from disk. As it does this, I can see (with
MemoryStick) that the amount of the computer's "inactive" memory goes way up
- that is, more and more RAM is being allocated to "inactive" memory, until
RAM fills up (the amount of "free" memory drops to near zero). When the app
is done, this memory is not given back.
My guess is that this memory is a caching of the tiff files from disk. The
reason for this guess is in part that if I run my app again, it all happens
much faster and there is no sound of the disk being read.
What I'd like to do is give back the memory after I'm done with each file. I
have tried all the Cocoa tricks I can think of (autorelease pools
everywhere, explicit init and release wherever possible, and so forth) but
nothing helps. In fact, this is apparently not a Cocoa memory management
issue - I'm not leaking memory, AFAIK - it's a system memory management
issue. It's like I'm fighting the virtual memory system.
Is what I'd like to do reasonable / possible? Thx - m.
--
matt neuburg, phd = email@hidden,
http://www.tidbits.com/matt/
pantes anthropoi tou eidenai oregontai phusei
AppleScript: the Definitive Guide! NOW SHIPPING...! (Finally.)
http://www.amazon.com/exec/obidos/ASIN/0596005571/somethingsbymatt
Subscribe to TidBITS! It's free and smart.
http://www.tidbits.com/
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.