1. make slab work cross-platform
2. fix a bug in slab, and do some test, it seems working
add comments for slab