gcl-devel
[Top][All Lists]
Advanced

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

[Gcl-devel] Re: GCL and GMP


From: Camm Maguire
Subject: [Gcl-devel] Re: GCL and GMP
Date: 18 Aug 2004 10:37:15 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Greetings, and thanks!

OK, I've taken a hybrid strategy:

1) all arguments distinct -- lonjmp back to the beginning of the call,
   gc, and try the call again.
2) destination arg(s) match some source arg(s) -- satisfy allocation
   by adding new pages to the heap and schedule a gc call after the
   gmp call finishes.

This seems to be safe and stable and is passing all tests, including
fixing the error report that triggered all this work.

Needless to say, if you have any concerns/comments, they are most
appreciated.  Otherwise, thank you again for your valuable feedback.
(Haven't gotten any other replies from the gmp list).

Take care,

Kevin Ryde <address@hidden> writes:

> > And I take it from the first point above that the only
> > issue may reside in an in-place operation that gets aborted in the
> > middle by a longjmp.
> 
> I guess so.  I think the key would be that the destination is trashed.
> Normally source operands are untouched, but if source==dest then the
> destination-trashing would apply there too.
> 
> > Is my assumption about the 'realloc first then write in one
> > go' valid?
> 
> I don't think that's guaranteed.  It's highly desirable for
> efficiency, and might even be true currently, but I can imagine
> multiple reallocs in tricky cases, or if an mpz function is
> implemented using other mpz functions.
> 
> 
> 

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