Skip to content

Memory Management: LunarMMU

feiben edited this page Mar 10, 2016 · 4 revisions

For any server-end middle ware, stability is the most important thing. A well designed memory management system can significantly reduce the memory fragments, fasten the alloc/free speed. You really do not want your application alloc a block of memory every time from a busy OS, since it will leads to a failure allocation, proved to be fatal for any application. LunarMMU is designed for such purpose:

  1. almost constant time of alloc and free
  2. has an upper bound of memory consumption
  3. produces no memory fragments, even after billions of alloc/free

LunarMMU is not a memory system for general purpose. It is for LunarBase and cache only. There is a price payed for the above three advantages. The memory occupation will be little more bigger than that is really needed.

But as the plummet of hard disk price, so is the memory price. This trade off is much worthy.

Not only LunarMMU allocates memory directly from OS, but also it gets memory from LunarMax, which virtualizes extra disk space as memory. It is quite similar to what operation system does. Consult this chapter for its advantage and scenario.

Clone this wiki locally