Gabe Black has submitted this change and it was merged. (
https://gem5-review.googlesource.com/c/public/gem5/+/13292 )
Change subject: systemc: Add a simple implementation for sc_mempool.
......................................................................
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 <[email protected]>
Maintainer: Gabe Black <[email protected]>
---
M src/systemc/dt/sc_mempool.cc
1 file changed, 2 insertions(+), 3 deletions(-)
Approvals:
Gabe Black: Looks good to me, approved; Looks good to me, approved
diff --git a/src/systemc/dt/sc_mempool.cc b/src/systemc/dt/sc_mempool.cc
index ae58dd7..cc833ab 100644
--- a/src/systemc/dt/sc_mempool.cc
+++ b/src/systemc/dt/sc_mempool.cc
@@ -36,13 +36,12 @@
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()
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/13292
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I6fdc01a69ca017d94b14a15a196ad29b66ef9858
Gerrit-Change-Number: 13292
Gerrit-PatchSet: 3
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Giacomo Travaglini <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: Matthias Jung <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev