swarm-support
[Top][All Lists]
Advanced

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

Re: question about dynamic memory allocation


From: Marcus G. Daniels
Subject: Re: question about dynamic memory allocation
Date: 12 Mar 1999 15:01:56 -0800

>>>>> "PJ" == Paul E Johnson <address@hidden> writes:

PJ>  Point.m: In function `_i_Point__createEnd': Point.m:52: warning:
PJ> assignment makes pointer from integer without a cast

If you include <misc.h> and use xmalloc, you shouldn't get that warning.
xmalloc is just like malloc except it aborts on failure.  The warning
probably is due to malloc not being declared.

PJ> But if I don't drop it and swarm ends, are the
PJ> memory globs given back to the good people who need them? 

Yes.  For example, with a GNU/Linux system like Redhat the loader maps
the user a heap and unmaps it when the process exits.  malloc makes
requests to the kernel to grow the heap as necessary.  You can see the
sequence of events from the point of view of the kernel using a
command like `strace heatbugs'.

There are actually a number of independent memory regions mapped in to
a Swarm process.  With Linux, you can get this information with
`cat /proc/PID/maps'.  With Solaris, the command is `/usr/proc/bin/pmap PID'.
(Where PID is the process id of the running program of interest.)

                  ==================================
   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]