This class is supposed to be a more efficient way to manage small bits
of memory. At least for now, new and delete will do the same job
functionally. Also, the heap manager may be just as efficient as
whatever custom mechanism sc_mempool would use.
Change-Id: I6fdc01a69ca017d94b14a15a196ad29b66ef9858
Reviewed-on: https://gem5-review.googlesource.com/c/13292
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
void *
sc_mempool::allocate(std::size_t sz)
{
- warn("%s not implemented.\n", __PRETTY_FUNCTION__);
- return nullptr;
+ return ::operator new(sz);
}
void
sc_mempool::release(void *p, std::size_t sz)
{
- warn("%s not implemented.\n", __PRETTY_FUNCTION__);
+ ::operator delete(p);
}
void
sc_mempool::display_statistics()