Go to file
Shuxin Yang c6cfc27f43 pass the 1st unit test 2014-08-15 16:04:47 -07:00
obj rudimentary implementation luajit mem-managment for taking full advantage of lower 2G memory 2014-08-07 11:05:29 -07:00
LICENSE Initial commit 2014-08-07 10:48:40 -07:00
Makefile pass the 1st unit test 2014-08-15 16:04:47 -07:00
README.md rudimentary implementation luajit mem-managment for taking full advantage of lower 2G memory 2014-08-07 11:05:29 -07:00
demo.c rudimentary implementation luajit mem-managment for taking full advantage of lower 2G memory 2014-08-07 11:05:29 -07:00
lj_mm.h enable unit-test infra-structure 2014-08-15 13:06:49 -07:00
page_alloc.c pass the 1st unit test 2014-08-15 16:04:47 -07:00
page_alloc.h pass the 1st unit test 2014-08-15 16:04:47 -07:00
rb_test.cxx add a banner for rb-tree search testing 2014-08-14 14:13:56 -07:00
rbtree.c Fix bugs of rb-tree. The bug is about searching element with key no-less-than 2014-08-14 11:49:33 -07:00
rbtree.h Add unit-test support. 2014-08-14 16:05:54 -07:00
trunk.c Divide page_alloc.c into two parts: one is still for page allocation, the other part is to implement 2014-08-14 14:09:14 -07:00
trunk.h enable unit-test infra-structure 2014-08-15 13:06:49 -07:00
util.h Divide page_alloc.c into two parts: one is still for page allocation, the other part is to implement 2014-08-14 14:09:14 -07:00

README.md

luajit-mm

Luajit take full advantage of lower 2G memory on AMD64 platform.

Rumdimentary implementation. Not yet fully tested. Not yet cleanup the code. Quite a few optimizatio is not yet implemented.

Immediate todo

o.Refine and finish this README.
o.test, add enhancements.

problem statement:

On Linux/x86-64 platform, Luajit can use no more than 1G memory due to the combination of bunch of nasty issues. 1G is way too small for server-side application.

This package is trying to replace mmap/munmap/mremap with hence provide up to about 2G space.

Basic ideas

o. When a application, which contain luajit, is launched, reserve the the space
   from where `sbrk(0)` indidate all the way to 2G.

o. Perform page allocation on the reserved space. the mmap/munmap/mremap is built
   on this page allocation. Currently, we use buddy allocation for page allocation
   with some optimizations in an attemp to reduce working set.