fix test_memalloc