[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
        Topic:  The Heap Library                Author: David Holmes


        Discussion:
        ------------------------------------------------------------------
                This heap library implements a dynamic, self-adjusting
        array in FORCE.  It can handle any data type, but you must be
        careful to pass the addresses of the objects that you insert.

                All functions that deal with the heap are accessed through
        the heap_* functions, and operate not on the heap directly, but
        on a structure that has a pointer to the heap in it.

                The heap structure looks something like this:

                HEAP STRUCTURE:
                        UINT            current_heap_size
                        UINT            current_number_of_filled_nodes
                        LONG            pointer_to_compare_function
                        LONG            pointer_to_heap
                END STRUCTURE

        Comments
        ------------------------------------------------------------------
        To see example of how these functions are used, look at the
        FSORT program in the ALLOC edition of the FAQ.  If anyone would
        like more examples, or even more functions (like heap_search(),
        heapify(), or heap_delete()), don't hesitate to let me know.




See Also: Memory_allocation alloc/malloc_usage heap_functions alloc.hdr heap.hdr example_code
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson