summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2018-10-03 17:37:53 -0700
committerGabe Black <gabeblack@google.com>2018-10-16 00:50:54 +0000
commitd8721496c98efd699eeccafa07e04bb9ed02e4be (patch)
treef902c0bf77bf0bc35ec3f0b2adfad508d51d2830
parentd371c9e0db60818ba829f5b80c9428f1e09b49df (diff)
downloadgem5-d8721496c98efd699eeccafa07e04bb9ed02e4be.tar.xz
systemc: Add a simple implementation for sc_mempool.
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>
-rw-r--r--src/systemc/dt/sc_mempool.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/systemc/dt/sc_mempool.cc b/src/systemc/dt/sc_mempool.cc
index ae58dd780..cc833ab1c 100644
--- a/src/systemc/dt/sc_mempool.cc
+++ b/src/systemc/dt/sc_mempool.cc
@@ -36,13 +36,12 @@ namespace sc_core
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()