protected Slot AllocateSlot(int length) { Slot reusedSlot = _container.FreespaceManager().AllocateSafeSlot(length); if (reusedSlot != null) { return(reusedSlot); } return(_container.AppendBytes(length)); }
private Slot AllocateSlot(bool appendToFile, int slotLength) { if (!appendToFile) { Slot slot = _container.FreespaceManager().AllocateSafeSlot(slotLength); if (slot != null) { return(slot); } } return(_container.AppendBytes(slotLength)); }