Ejemplo n.º 1
0
 protected override bool AllocateBlocks()
 {
     for (int n = 0; n < GrowthCount; n++)
     {
         KMemoryBlock block = Partition.Allocate(string.Format("VPL {0} block", this.Name), KAllocType.Low, 0, BlockSize);
         if (block == null)
         {
             return(false);
         }
         Blocks.Enqueue(block);
         FreeBlocks.Enqueue(block);
     }
     return(true);
 }
Ejemplo n.º 2
0
 public bool AllocateFplBlocks()
 {
     for (int n = 0; n < this.BlockCount; n++)
     {
         KMemoryBlock block = this.Partition.Allocate(string.Format("FPL {0} block", this.Name), KAllocType.Low, 0, this.BlockSize);
         if (block == null)
         {
             return(false);
         }
         Blocks.Enqueue(block);
         FreeBlocks.Enqueue(block);
     }
     return(true);
 }