[DGD] Memory usage in 1.2p2

Felix A. Croes felix at dworkin.nl
Thu Mar 13 21:59:50 CET 2003


<tavise at nwlink.com> wrote:

>[...]
> What I see when I run with the debug is this:
>
> STATUS: static: 3.04 Mb (96.41% used) dynamic: 1.25 Mb (64.13% used)
> STATUS: static: 3.04 Mb (96.41% used) dynamic: 1.25 Mb (64.22% used)
> STATUS: static: 132.02 Mb (2.22% used) dynamic: 0.50 Mb (67.02% used)
> STATUS: static: 261.02 Mb (1.12% used) dynamic: 0.50 Mb (67.70% used)
> STATUS: static: 390.03 Mb (0.75% used) dynamic: 0.50 Mb (64.51% used)
> STATUS: static: 1447.25 Mb (0.20% used) dynamic: 0.50 Mb (61.55% used)

This is certainly a bug in DGD.

Static memory and dynamic memory are allocated from different pools.
Static memory allocations are infrequent, and DGD attempts to have all
static memory pools contiguous in memory.  Dynamic memory allocations
are very frequent.

During normal execution, the only actions that allocate static memory
are the compilation of an object, and the creation of an editor
instance.  Note that static memory is freed as well -- 1447.25 Mb
allocated but 0.20% used.  The problem is that for some reason, free
static memory is not re-used, but the size of the static memory pool
is increased, instead.

If you can provide me with a tarfile of all relevant files of your
mud, together with a way to recreate the bug, I should be able to
release a patch for it the same day.  Alternatively, you could give
me temporary access to your site and allow me to study the problem
in situ.


>[...]
> - I've noticed 'threads' in the driver docs ... is there any thread-safe
> practices that must be observed in LPC to make sure there are no
> concurrency problems?

LPC "threads" are not concurrent, they run in sequence.  But each starts
for a specific reason and eventually ends, and thus it still makes sense
to speak of threads, as opposed to a continuous flow of execution.  They
are called threads, and not by some other name, because in the future,
they may (invisibly to the LPC programmer) actually overlap.  Even then,
concurrency is not something the LPC programmer will have to worry about.

Regards,
Dworkin
_________________________________________________________________
List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list