Just learned fixed block heap from class. It is incredibly fast for the same size of objects and have millions. The idea here is allocating a big block of memory. Just leave it empty. We determine the size of each block. It works in single link list. The header works as the root and keep track of the information. The root points to the free space of the block memory. Then we put pointer next to the free block in the free space. The running time is constant. It is super super fast.
No comments:
Post a Comment