swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Memory problems mixing zones & malloc


From: Steve Emsley
Subject: Re: Memory problems mixing zones & malloc
Date: Fri, 24 Oct 1997 10:50:15 +0100

Thanks Dwight,

Embarrassing to think that I've avoided dynamic allocation through
several thousand lines of code just because the C primers I have don't
explain malloc clearly.

1. The swarm doc entry for alloc doesn't mention whether an exception
occurs if there isn't enough memory for allocation.

2. Am I correct in thinking that the idea with zones is to keep
objects that frequently pass messages to each other in the same zone
and in different zones from objects (esp. large) that are infrequently
used. Is it more efficient to create named zones from globalZone to
segregate objects and use getZone to group objects - hoping to group
chatty objects within the machines memory page size?

3. When creating objects from a class the only memory allocated in
that that holds the instance variables. There is only one copy of
variables declared within the class but not in the interface - for
instance large static declared arrays declared before the
@implementation statement. Is that right?

Apologies for the basic questions but although I've downloaded the
ObjC manual, Swarm docs & people's code this malloc business makes me
doubt that I know what I'm doing.

Cheers.
-- 
-----------------------------------------------------------------------
 Steve Emsley                   Ecosystems Analysis & Management Group
 address@hidden                University of Warwick, England
 http://www.oikos.warwick.ac.uk/~sme/             (+44) (0)1598 753648
-----------------------------------------------------------------------

                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.
                  ==================================


reply via email to

[Prev in Thread] Current Thread [Next in Thread]