Test the memory allocation
Fixed memory allocation