added unit test to rmp. fixed a bug in rmp_alloc. all test passed.