[Ecls-list] Porting ECL to the Hurd

Juan Jose Garcia-Ripoll jjgarcia at users.sourceforge.net
Sun Feb 11 09:43:06 UTC 2007


2007/2/11, Pierre THIERRY <nowhere.man at levallois.eu.org>:
> There is one thing I'm not sure, not knowing ECL's internals: in
> backup_fopen, should the malloc'ed buffer be freed before any call to
> FElibc_error() or only before the return statement (as I do now)?

malloc() can not be used in ECL. ECL is a garbage collected program
and as such you should use the garbage collector to allocate memory.
The required routines are cl_alloc(), cl_alloc_atomic(), etc The call
to cl_dealloc() should then be placed before the main return. I will
audit your patches later.

Juanjo

-- 
Dpto. de Fisica Teorica I, Fac. de CC Fisicas, Universidad Complutense,
Ciudad Universitaria s/n Madrid 28040 (Spain)
http://teorica.fis.ucm.es/~jjgarcia/




More information about the ecl-devel mailing list