Basic memory manager