
Return Rc_word set to the number of bytes of memory malloc()'ed JLMU(Rc_word, PJLArray) // JudyLMemUsed()

Return Rc_word set to the number of bytes freed and PJLArray
#UPOINTER FREE FREE#
Given a pointer to a JudyL array, free the entire array (much faster JLFA(Rc_word, PJLArray) // JudyLFreeArray() Set to the Nth index if found, otherwise return Return PValue pointing to its Value and Index PJLArray ( Nth = 1 returns the first index present). Locate the Nth index that is present in the JudyL array JLBC(PValue, PJLArray, Nth, Index) // JudyLB圜ount() To count all indexes present in a JudyL array, use: JLC(Rc_word, PJLArray, Index1, Index2) // JudyLCount()Ĭount the number of indexes present in the JudyL array PJLArray betweenĪ return value of 0 can be valid as a count. Return PValue set to NULL if the Index was not present. Get the pointer PValue associated with Index in the PJLArray Judy array. JLG(PValue, PJLArray, Index) // JudyLGet() Return Rc_int set to JERR if a malloc() fail occured. Return Rc_int set to 0 if Index was not present. JLD(Rc_int, PJLArray, Index) // JudyLDel()ĭelete the Index/ Value pair from the JudyL array. Therefore, PValue returned from previous JudyL calls become JLI() and JLD() reorganize the JudyL array. Return PValue set to PJERR if a malloc() fail occured. JLI() (insert), JLD() (delete) or JLFA() (freearray) Your program can use this pointer to read or modify Value until the next Insert an Index and Value into the JudyL array PJLArray. JLI(PValue, PJLArray, Index) // JudyLIns()

They are the preferred way of calling the JudyL functions. JLI( PValue, PJLArray, Index) // JudyLIns()īecause the macro forms are sometimes faster and have a simpler error įor other error handling methods, see the Message to the standard error and terminates the program with exit(1). Using the macros described here, rather than the

The value may be used as a scalar, or a pointer to a structure or block of dataĪ JudyL array is allocated with a NULL pointer Thought of as a mapper, that is "map" a word to another word/pointer.Īs with an ordinary array, there are no duplicate indexes in a JudyL array. Memory to support the array is allocated as index/value pairs are inserted,Īnd released as index/value pairs are deleted. The array may be sparse, and the Index may be any word-sized number. JLI( PValue, PJLArray, Index) // JudyLIns() JLD( Rc_int, PJLArray, Index) // JudyLDel() JLG( PValue, PJLArray, Index) // JudyLGet() JLC( Rc_word, PJLArray, Index1, Index2) // JudyLCount() JLBC(PValue, PJLArray, Nth, Index) // JudyLB圜ount() JLFA(Rc_word, PJLArray) // JudyLFreeArray() JLMU(Rc_word, PJLArray) // JudyLMemUsed() JLF( PValue, PJLArray, Index) // JudyLFirst() JLN( PValue, PJLArray, Index) // JudyLNext() JLL( PValue, PJLArray, Index) // JudyLLast() JLP( PValue, PJLArray, Index) // JudyLPrev() JLFE(Rc_int, PJLArray, Index) // JudyLFirstEmpty() JLNE(Rc_int, PJLArray, Index) // JudyLNextEmpty() JLLE(Rc_int, PJLArray, Index) // JudyLLastEmpty() JLPE(Rc_int, PJLArray, Index) // JudyLPrevEmpty()Ī JudyL array is the equivalent of an array of word-sized values. Pvoid_t PJLArray = (Pvoid_t) NULL // initialize JudyL array PWord_t PValue // pointer to return value
#UPOINTER FREE CODE#
Word_t Rc_word // return code - unsigned word C library for creating and accessing a dynamic array of words, using
