• jimb's avatar
    include: · a3af3ae8
    jimb authored
    Allow the user to specify functions for allocating memory for
    splay tree roots and nodes.
    * splay-tree.h (splay_tree_allocate_fn, splay_tree_deallocate_fn):
    New types.
    (splay_tree): New fields: `allocate', `deallocate', and
    `allocate_data'.
    (splay_tree_new_with_allocator): New function declaration.
    
    libiberty:
    * splay-tree.c (splay_tree_xmalloc_allocate,
    splay_tree_xmalloc_deallocate): New functions.
    (splay_tree_new): Call splay_tree_new_with_allocator, passing the
    above functions and a dummy data pointer.
    (splay_tree_new_with_allocator): New function.
    (splay_tree_delete_helper, splay_tree_delete, splay_tree_insert,
    splay_tree_remove): Use the splay tree's allocation and
    deallocation functions.
    
    
    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@49968 138bc75d-0d04-0410-961f-82ee72b054a4
    a3af3ae8
ChangeLog 166 KB