axiom-developer
[Top][All Lists]
Advanced

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

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


From: Stephen Wilson
Subject: Re: [Axiom-developer] Re: counting allocated bytes
Date: 11 Jul 2007 23:34:21 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4

Camm Maguire <address@hidden> writes:

> Greetings!
> 
> Shouldn't this function be total-bytes-used on second thought?

Yes, absolutely.  Unfortunately the intended result and the effective
result do not match,  but I belive this is a usefull function to have
in many situations.

I am looking into the possibility of getting a proper implementation
of a get-bytes-consed varient, using a new slot tm_totalloc in the
typemanager to carry a bignum (and thus not relying on tm_nused for
this purpose).  Unfortunately this would mean an mp addition in the
middle of make_cons.  Furthermore there does not seem to be a general
interface to direct, destructive mp arithmetic exported via the
generic mp.h.  Is pari still supported?  


Thanks,
Steve


> 
> Stephen Wilson <address@hidden> writes:
> 
> > Hello Camm,
> > 
> > Thank you for including this change!
> > 
> > [...]
> > > 2) The algorithm needs correcting when sgc is on -- is one interested
> > >    in the active read-write set, of the static read-only set here?
> > 
> > My understanding of stratified gc is that the read-only set is what
> > counts here, but I would need to delve into the details of GCL's
> > implementation before I could make a conclusive statement in this
> > regard.
> > 
> 
> Actually a hybrid:
> 
> current algorithm counts
> all used cells
> all allocated contiguous pages
> read-write only used relocatable blocks.
> 
> Take care,
> 
> > 
> 
> 
> > To save you some typing, attached is a very terse patch against
> > si-defs.texi.  Not to sure what else one needs to say about this
> > function.
> > 
> > 
> > Thanks again,
> > Steve
> > 
> > 
> > --- si-defs.texi    2007-07-11 17:06:05.000000000 -0400
> > +++ si-defs.texi.smw        2007-07-11 17:05:16.000000000 -0400
> > @@ -375,7 +375,14 @@
> >  
> >  
> >  @end deffn
> > address@hidden TOTAL-BYTES-ALLOCATED ()
> > +Package:SI
> > +
> > +GCL specific: Returns the total number of bytes allocated by GCL since
> > +the image was started.
> >  
> > +
> > address@hidden defun
> >  @defun *MAKE-SPECIAL (symbol)
> >  Package:SI
> >  
> > _______________________________________________
> > Axiom-developer mailing list
> > address@hidden
> > http://lists.nongnu.org/mailman/listinfo/axiom-developer
> 
> -- 
> 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]