lnknfn |
Table of contents
ProcedureLNKNFN ( LNK, number of free nodes ) INTEGER FUNCTION LNKNFN ( POOL ) AbstractReturn the number of free nodes in a doubly linked list pool. Required_ReadingNone. KeywordsLIST DeclarationsIMPLICIT NONE INTEGER LBPOOL PARAMETER ( LBPOOL = -5 ) INTEGER POOL ( 2, LBPOOL : * ) Brief_I/OVARIABLE I/O DESCRIPTION -------- --- -------------------------------------------------- POOL I A doubly linked list pool. LBPOOL P Lower bound of pool column indices. The function returns the number of free nodes in the pool. Detailed_InputSIZE is the number of nodes in the pool. POOL is a doubly linked list pool. Detailed_OutputThe function returns the number of free nodes in the pool. ParametersLBPOOL is the lower bound of the column indices of the POOL array. The columns indexed LBPOOL to 0 are reserved as a control area for the pool. ExceptionsError free. FilesNone. ParticularsThis routine allows the caller to find the number of free nodes available in a doubly linked list pool, without having to make use of knowledge of the internal structure of the pool. Routines that allocate nodes can use this routine to determine how many nodes can be allocated safely---an attempt to allocate a node when no free nodes are available causes a SPICELIB error to be signaled. Examples1) Let POOL be a doubly linked list pool containing 5 nodes. If POOL contains the list 4 <--> 5 <--> 1 <--> 2 and the node 3 is unallocated, then the function reference NFREE = LNKNFN ( POOL ) will assign the value 1 to NFREE. Restrictions1) Linked list pools must be initialized via the routine LNKINI. Failure to initialize a linked list pool will almost certainly lead to confusing results. Literature_ReferencesNone. Author_and_InstitutionN.J. Bachman (JPL) J. Diaz del Rio (ODC Space) W.L. Taber (JPL) VersionSPICELIB Version 1.0.1, 24-NOV-2021 (JDR) Edited the header to comply with NAIF standard. SPICELIB Version 1.0.0, 19-DEC-1995 (NJB) (WLT) |
Fri Dec 31 18:36:31 2021