Re: Memory usage
Re: Memory usage
- Subject: Re: Memory usage
- From: Michael Becker <email@hidden>
- Date: Fri, 25 Mar 2005 16:00:39 +0100
Am 25.03.2005 um 02:24 schrieb Matt Neuburg:
First of all, don't do memory management with any other tool than e.g.
ObjectAlloc. Mac OS X virtual memory will mislead you, because it
retains
memory you are not actually using, so think only in terms of actual
objects
/ leaks. That said, virtual memory itself can take a little
management. The
problem might be that virtual memory doesn't let go of disk areas that
you
read. This is very noticeable with big disk areas (i.e. images). I had
this
problem with an image-processing app until Michael Rothwell put me onto
fcntl and F_NOCACHE. This solved things instantly. Check the archives.
m.
PS Also memory management with images is tricky in general because of
caching. I do a lot of recaching (perhaps unnecessarily).
Thanks for all your replies. I am a little embarassed to say this, but
my problem turned actually out to be a simple memory leak. I wasn't
releasing a helper object that was alloc-init'ed in every iteration of
a very long loop. Shame on me.
Now the RPRVT value is down to about 7 Megs when it was about 70+
before! But your information and hints to memory checking are very
useful for me nonetheless!
Thanks!
Michael
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden