[Spice_discussion] Maximum memory consumption

Ryosuke NAKAMURA ryosuke at selene.tksc.jaxa.jp
Tue Mar 15 20:24:43 PST 2005


Dear Ed and Chuck 

Thanks for your prompt response.

> >> Memory allocation depends on use and language. Which language do you
> >> intend to use for you application? FORTRAN, C, IDL?
> >
> > Our application will be written in C.
> 
> I can't give you an exact answer; memory usage depends on which SPICE 
> routines you call. The CSPICE core consists of C code generated from 
> FORTRAN by the f2c utility, since FORTRAN lack dynamic memory 
> allocation, the f2c's routines do as well. This causes a rather high 
> memory overhead due to all the static memory assignments. However, 
> several f2c library routines, and several CSPICE wrapper routines (the 
> _c.c files) do use dynamic memory.

I found several wrapper routines including "malloc", such as 

ekacec_c.c: 
ekacld_c.c: 
ekacli_c.c: 
ekucec_c.c: 
getelm_c.c: 
mtxmg_c.c:  
mxmg_c.c:   
mxmtg_c.c:  
mxvg_c.c:   
prompt_c.c: 

To what routines should we pay special attention if we want to monitor 
the memory space?

> Please note, a series of tests on the CSPICE N58 toolkit identified a 
> number of memory leaks, leaks corrected for the N59 release.

I see.

-----------------------------

Ryosuke NAKAMURA
Institute of Space and Astronautical Science (ISAS),
Japan Aerospace Exploration Agency (JAXA),
Sengen 2-1-1, Tsukuba 305-8505, Japan

E-mail: ryosuke at selene.tksc.jaxa.jp
Tel:81-29-868-2526 Fax:81-29-868-2982




More information about the Spice_discussion mailing list