[Zope-Checkins] CVS: Zope2 - BTreeTemplate.c:1.9.2.7

Jim Fulton jim@digiciool.com
Sun, 4 Mar 2001 14:09:52 -0500 (EST)


Update of /cvs-repository/Zope2/lib/python/BTrees
In directory korak:/tmp/cvs-serv30289

Modified Files:
      Tag: Catalog-BTrees-Integration
	BTreeTemplate.c 
Log Message:
Added assertions and sanity checks while chasing down memory problem
in large trees.

Changed to support has_key in trees returning tree depth.

Factored "clearing" code, used by clear method, _p_deactivate method,
and deallocator to use common routine.

Now desctivating (ghostifying) releases internal dynamic array,
freeing more memory, at possible cost of extra mallocs when data are
reloaded. 

Fixed tree splitting bug that caused memory errors when the tree depth
(including leaf/bucket nodes) rose above three.

Reversed a reverse loop (reverse loops are empirically evil) that
caused apparent memory errors that were really excessive stack grown
when deallocating huge linked lists of buckets.

cleaned up some comments.