pub fn allocate(&mut self, size: MemSize) -> MemoryBlock {
        if size == 0 {
            return MemoryBlock::default();
        }

        let blk = MemoryBlock {
            id: MemId(self.next_id),
            size: size,
        };
        self.next_id += 1;

        blk
    }
/// Allocates a memory block of the given size and gives it a unique ID
/// so that this memory block can be referred to uniquely
Allocates a memory block of the given size and gives it a unique ID
so that this memory block can be referred to uniquely
Allocates a memory block of the given size and gives it a unique ID so that this memory block can be referred to uniquely
pub fn allocate(&mut self, size: MemSize) -> MemoryBlock {
        if size == 0 {
            return MemoryBlock::default();
        }
        let blk = MemoryBlock {
            id: MemId(self.next_id),
            size: size,
        };
        self.next_id += 1;
        blk
    }
pub fn allocate ( & mut self , size : MemSize ) -> MemoryBlock { if size == 0 { return MemoryBlock :: default ( ) ; } let blk = MemoryBlock { id : MemId ( self . next_id ) , size : size , } ; self . next_id += 1 ; blk }
Allocates a memory block of the given size and gives it a unique ID
so that this memory block can be referred to uniquely
Allocates a memory block of the given size and gives it a unique ID so that this memory block can be referred to uniquely
&mut self
size
MemSize
&mut self
size
MemSize