Btrees

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

Revision history for Perl extension Btrees.

... #3 change 19157 edit on 2001/08/21 by ron@slb_ron (xtext)

        For Btrees, give credit where credit due.

... #2 change 7941 edit on 2001/01/15 by ron@slb_ron (xtext)

        Incorporated Btrees into address selection for memory fragment
        allocation.

... #1 change 7886 add on 2001/01/15 by ron@slb_ron (xtext)

        Added Btrees for an O(N) to log2N speedup for list data that must
        remain unique over the list.

t/testBtrees.t  view on Meta::CPAN

    my( $min2, $max2 ) = split( ':', $val2 );
    return $max1 < $min2 ? -1 : $min1 > $max2 ?  1 : 0;
}

#########################################
#
# Method: _uniqueAddrs
#
# _uniqueAddrs( $tree, $mask, $maxSdramSize, @bytes );
#
# Insures no address fragment overlaps with any others address.
# Mask is used for alinged address requests of any alignment.
#
sub _uniqueAddrs {
    my ( $tree, $mask, $maxSdramSize, @bytes ) = @_;

    my ( $loc, $val, $add, $node );
    while ( @bytes ) {
        do {
	    $loc = ( int(rand($maxSdramSize)) & $mask );
	    $add = $loc + $bytes[0];



( run in 0.859 second using v1.01-cache-2.11-cpan-364913b4093 )