implemented allocation stack caching for malloc