Re: Trying to understand "real memory" usage
Re: Trying to understand "real memory" usage
- Subject: Re: Trying to understand "real memory" usage
- From: Matt Neuburg <email@hidden>
- Date: Sat, 12 Mar 2005 11:05:51 -0800
On or about 3/12/05 10:06 AM, thus spake "Christopher Drum"
<email@hidden>:
> Well, I suppose I should have clarified in saying, "What text resources
> can be suggested?" I need to better understand, before I've even
> written code, how my decisions may affect memory usage. My hope is that
> it will lead to smarter coding strategies as I get better.
> On Mar 11, 2005, at 8:44 PM, Matt Neuburg wrote:
>
>> On Fri, 11 Mar 2005 18:21:07 -0800, Christopher Drum
>> <email@hidden> said:
>>> What resources can the list suggest for understanding how memory gets
>>> used
>>
>> ObjectAlloc? m.
Well, consult the archives for references, since memory management is a
frequent topic. Memory management from the Cocoa programmer's point of view
is very well explained in "Hold me use me free me" and similar articles.
But I still think you should pay attention to my previous answer. Virtual
memory is complicated. Activity Monitor, ps, and so forth, looking from the
outside in, may report how much memory the system is holding for your app,
but they do not report how much memory the objects of your program are
actually using. For example, if you create a thousand objects and then
release them, the memory for them may still be set aside for your app by the
system. That's not a leak; it's just virtual memory doing its thing. That
memory may or may not be used for something else when the time comes, but in
any case it's no concern of yours. Much of the art here rests in not
worrying about things there's no point worrying about. 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/
_______________________________________________
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