Added memory_test.go test file with tests for SamePage function