update shared memory library and test

update shared memory library and test