Interface Allocator

    • Method Detail

      • allocate

        long allocate​(int size)
               throws Exception
        Allocate space with the given size.
        Parameters:
        size - size of space to allocate.
        Returns:
        address of the allocated space.
        Throws:
        Exception - This method will throw exception if failed to allocate space.
      • free

        void free​(long address)
        Free the space with the given address.
        Parameters:
        address - address of the space to free.
      • getChunkById

        Chunk getChunkById​(int chunkId)
        Returns the chunk with the given chunk id.
        Parameters:
        chunkId - id of the chunk.
        Returns:
        chunk with the given id.