gcl-devel
[Top][All Lists]
Advanced

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

[Gcl-devel] Re: [Axiom-developer] Re: counting allocated bytes


From: Camm Maguire
Subject: [Gcl-devel] Re: [Axiom-developer] Re: counting allocated bytes
Date: 11 Jul 2007 22:01:37 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4

Greetings!  As per my last message please also note that this does not
include allocation on the C stack as in :dynamic-extent or in GCL
forked child processes, which allocate everything on the C stack to
avoid copy-on-write penalties.

Stephen Wilson <address@hidden> writes:

> Hi Gregory,
> 
> Gregory Vanuxem <address@hidden> writes:
> 
> > Hello Stephen and Camm,
> > 
> > I'm particularly interested by this addition. Can it be considered as
> > comparable to get-byte-consed in SBCL or CMUCL ?
> 
> I do not belive so.  IIRC get-bytes-consed returns an increasing
> sequence of integers, effectively counting the number of allocations
> performed.
> 
> I was actually aiming for somthing similar, but due to my
> inexperience with GCL's internals I clearly got something wrong.  I
> was using si::allocated as a guide.  The sixth value is the number of
> uses of the given type.  Compare the following:
> 
> >(si:allocated 'cons)
> 
> 204399
> 819
> 819
> 512
> 0
> 4503032
> 
> >(si:total-bytes-allocated)
> 
> 3296240
> 
> >(defvar *c* (make-list 10000))
> 
> *C*
> 
> >(si:allocated 'cons)
> 
> 194336
> 819
> 819
> 512
> 0
> 4513095
> 
> >(si:total-bytes-allocated)
> 
> 3377336
> 
> >(setq *c* nil)
> 
> NIL
> 
> >(gbc t)
> 
> T
> 
> >(si:allocated 'cons)
> 
> 204527
> 819
> 819
> 512
> 0
> 4513143
> 
> >(si:total-bytes-allocated)
> 
> 3293360
> 
> 
> Notice how si::allocated is returning an increasing integer sequence
> in its sixth value,  whereas total-bytes-allocated is, as Camm
> mentioned, a report commensurate with (room).
> 
> 
> Camm, is it possible that tm_nused is providing the type of
> information  necessary to get an accurate picture of how much a
> function is consing, predictably increasing even amidst gc's?
> 
> Thanks,
> Steve
> 
> 
> 
> 

-- 
Camm Maguire                                            address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah




reply via email to

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