Fixed test to run with malloc and shmalloced memory space