[Spice_discussion] Maximum memory consumption

Ed Wright ed.wright at jpl.nasa.gov
Mon Mar 14 08:57:27 PST 2005

On Mar 14, 2005, at 8:28 AM, Ryosuke NAKAMURA wrote:

>>> I'm going to use the NAIF toolkit as a part of the integrated data
>>> analysis
>>> package for SELENE imagers. Some developers are worrying about the
>>> memory allocation. How much memory space would be consumed by the 
>>> NAIF
>>> toolkit
>>> in the maximum?
>> 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.

Type of link also affects memory usage. The build scripts for all SPICE 
libraries and applications use static linking (except Icy).

As an example, the utility 'inspekt' which uses the EK system and 
dynamic memory, linked against CSPICE (cspice.a size 6,428,508 megs) 
uses a VSIZE of 96 megs when run on my OS X box (usage will increase 
when processing an EK), 'spacit' require 93 megs.

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

As always,
Ed Wright
ed.wright at jpl.nasa.gov

DISCLAIMER: JPL requires notice in all electronic communication that
any and all opinions presented herein are my own and do not, in any
way, represent the opinion or policy of JPL, CalTech, NASA, or the US

Disclaimers are without standing on traffic from this domain.

I do not accept responsibility for unexpected collisions between NASA
vehicles and Alien cruisers, any resulting interplanetary war, or a
grumpy Kilrathi.

More information about the Spice_discussion mailing list