public MemoryBlock( MemoryBlockType type, long sizeInBytes) { this.impl_ = new NestedRanges <IMemoryRange?>(null, this, sizeInBytes); this.Type = type; }
private MemoryBlock( INestedRanges <IMemoryRange?> impl, MemoryBlockType type) { this.impl_ = impl; this.Type = type; }
ClaimBlockAtEnd(MemoryBlockType type, long sizeInBytes) { var subrange = this.impl_.ClaimSubrangeAtEnd(null, sizeInBytes); var block = new MemoryBlock(subrange, type); subrange.Data = block; return(block); }
public IMemoryBlock ClaimBlockWithin(MemoryBlockType type, long offsetInBytes, long sizeInBytes) { var subrange = this.impl_.ClaimSubrangeWithin(null, offsetInBytes, sizeInBytes); var block = new MemoryBlock(subrange, type); subrange.Data = block; return(block); }