コード例 #1
0
        public static int InitSlot(LocalObjectContainer file)
        {
            var address = file.AllocateSlot(SlotLength()).Address();

            SlotEntryToZeroes(file, address);
            return(address);
        }
コード例 #2
0
        public override void Write(LocalObjectContainer container)
        {
            Slot slot = container.AllocateSlot(MarshalledLength());

            while (slot.Length() < MarshalledLength())
            {
                // This can happen if DatabaseGrowthSize is configured.
                // Allocating a slot may produce an additional entry
                // in this FreespaceManager.
                container.Free(slot);
                slot = container.AllocateSlot(MarshalledLength());
            }
            ByteArrayBuffer buffer = new ByteArrayBuffer(slot.Length());

            TreeInt.Write(buffer, (TreeInt)_freeBySize);
            container.WriteEncrypt(buffer, slot.Address(), 0);
            container.SystemData().InMemoryFreespaceSlot(slot);
        }
コード例 #3
0
 public virtual Slot AllocateTargetSlot(int length)
 {
     return(_targetDb.AllocateSlot(length));
 }
コード例 #4
0
 public override void Write(LocalObjectContainer container)
 {
     var slot = container.AllocateSlot(MarshalledLength());
     while (slot.Length() < MarshalledLength())
     {
         // This can happen if DatabaseGrowthSize is configured.
         // Allocating a slot may produce an additional entry
         // in this FreespaceManager.
         container.Free(slot);
         slot = container.AllocateSlot(MarshalledLength());
     }
     var buffer = new ByteArrayBuffer(slot.Length());
     TreeInt.Write(buffer, (TreeInt) _freeBySize);
     container.WriteEncrypt(buffer, slot.Address(), 0);
     container.SystemData().InMemoryFreespaceSlot(slot);
 }
コード例 #5
0
 public static int InitSlot(LocalObjectContainer file)
 {
     var address = file.AllocateSlot(SlotLength()).Address();
     SlotEntryToZeroes(file, address);
     return address;
 }