Set or get an integer-valued AST global tuning parameter


This function returns the current value of an integer-valued AST global tuning parameter, optionally storing a new value for the parameter. For character-valued tuning parameters, see astTuneC.


int astTune( const char name, int value )


The name of the tuning parameter (case-insensitive).
The new value for the tuning parameter. If this is AST__TUNULL, the existing current value will be retained.

Returned Value

The original value of the tuning parameter. A default value will be returned if no value has been set for the parameter.


Tuning Parameters :

A boolean flag which indicates what should happen to the memory occupied by an AST Object when the Object is deleted (i.e. when its reference count falls to zero or it is deleted using astDelete). If this is zero, the memory is simply freed using the systems " free" function. If it is non-zero, the memory is not freed. Instead a pointer to it is stored in a pool of such pointers, all of which refer to allocated but currently unused blocks of memory. This allows AST to speed up subsequent Object creation by re-using previously allocated memory blocks rather than allocating new memory using the systems malloc function. The default value for this parameter is zero. Setting it to a non-zero value will result in Object memory being cached in future. Setting it back to zero causes any memory blocks currently in the pool to be freed. Note, this tuning parameter only controls the caching of memory used to store AST Objects. To cache other memory blocks allocated by AST, use MemoryCaching.
A boolean flag similar to ObjectCaching except that it controls caching of all memory blocks of less than 300 bytes allocated by AST (whether for internal or external use), not just memory used to store AST Objects.