/** * Allocates a slot */ FreePhysicalRowId alloc( int slot ) { setCount( ( short ) ( getCount() + 1 ) ); return get( slot ); }
/** * Returns true if a slot is allocated */ boolean isAllocated( int slot ) { return get( slot ).getSize() != 0; }
retval = new Location( fp.get( slot ) );
retval = new Location( fp.get( slot ) );
/** Allocates a slot */ FreePhysicalRowId alloc( int slot ) { setCount( ( short ) ( getCount() + 1 ) ); return get( slot ); }
/** Returns true if a slot is allocated */ boolean isAllocated( int slot ) { return get( slot ).getSize() != 0; }
retval = new Location( fp.get( slot ) );
/** Allocates a slot */ FreePhysicalRowId alloc( int slot ) { setCount( ( short ) ( getCount() + 1 ) ); return get( slot ); }
/** Returns true if a slot is allocated */ boolean isAllocated( int slot ) { return get( slot ).getSize() != 0; }
/** Frees a slot */ void free( int slot ) { get( slot ).setSize( 0 ); setCount( ( short ) ( getCount() - 1 ) ); }
/** * @return first slot with available size >= indicated size, or -1 if no * slots are available. */ int getFirstLargerThan( int size ) { for ( int i = 0; i < ELEMS_PER_PAGE; i++ ) { if ( isAllocated( i ) && get( i ).getSize() >= size ) { return i; } } return -1; }
/** * Frees a slot */ void free( int slot ) { get( slot ).setSize( 0 ); setCount( ( short ) ( getCount() - 1 ) ); }
/** * Returns first slot with available size >= indicated size, or -1 if no * slots are available. */ int getFirstLargerThan( int size ) { for ( int i = 0; i < ELEMS_PER_PAGE; i++ ) { if ( isAllocated( i ) && get( i ).getSize() >= size ) { return i; } } return -1; } }
/** Frees a slot */ void free( int slot ) { get( slot ).setSize( 0 ); setCount( ( short ) ( getCount() - 1 ) ); }
/** * Returns first slot with available size >= indicated size, or -1 if no * slots are available. */ int getFirstLargerThan( int size ) { for ( int i = 0; i < ELEMS_PER_PAGE; i++ ) { if ( isAllocated( i ) && get( i ).getSize() >= size ) { return i; } } return -1; } }