/** Frees a slot */ void free(int slot) { setLocationBlock(slotToOffset(slot), 0); //get(slot).setBlock(0); setCount((short) (getCount() - 1)); // update previousFoundFree if the freed slot is before what we've found in the past if (slot < previousFoundFree) previousFoundFree = slot; }
/** Frees a slot */ void free(int slot) { get(slot).setBlock(0); setCount((short) (getCount() - 1)); }
/** Allocates a slot */ short alloc(int slot) { setCount((short) (getCount() + 1)); short pos = slotToOffset(slot); setLocationBlock(pos, -1); //get(slot).setBlock(-1); // update previousFoundAllocated if the newly allocated slot is before what we've found in the past if (slot < previousFoundAllocated) previousFoundAllocated = slot; return pos; }
/** Frees a slot */ void free(int slot) { get(slot).setBlock(0); setCount((short) (getCount() - 1)); }
/** * Frees a slot */ void free( int slot ) { get( slot ).setBlock( 0 ); setCount( (short) ( getCount() - 1 ) ); }
/** Allocates a slot */ PhysicalRowId alloc(int slot) { setCount((short) (getCount() + 1)); get(slot).setBlock(-1); return get(slot); }
/** Allocates a slot */ PhysicalRowId alloc(int slot) { setCount((short) (getCount() + 1)); get(slot).setBlock(-1); return get(slot); }
/** * Allocates a slot */ PhysicalRowId alloc( int slot ) { setCount( (short) ( getCount() + 1 ) ); get( slot ).setBlock( -1 ); return get( slot ); }