summaryrefslogtreecommitdiff
path: root/base/fast_alloc.hh
diff options
context:
space:
mode:
authorSteve Reinhardt <stever@eecs.umich.edu>2003-12-15 20:55:10 -0800
committerSteve Reinhardt <stever@eecs.umich.edu>2003-12-15 20:55:10 -0800
commite537fb3fd61f62040a579976c27903bcb2d52939 (patch)
tree4ef53ec8c376c134a4769a2e8127034260c50544 /base/fast_alloc.hh
parent3c6fc7c269ef38bb4e3d147fbabe3f0dfbe1add7 (diff)
downloadgem5-e537fb3fd61f62040a579976c27903bcb2d52939.tar.xz
Add #define parameter and corresponding build option to
disable FastAlloc. Gcc 3.3.x appears to have a bug that breaks FastAlloc when compiled with optimization. base/fast_alloc.cc: base/fast_alloc.hh: #define NO_FAST_ALLOC makes FastAlloc a no-op. --HG-- extra : convert_revision : bf4bb8e963331c6782f2cfd475a811aa520e31b5
Diffstat (limited to 'base/fast_alloc.hh')
-rw-r--r--base/fast_alloc.hh9
1 files changed, 9 insertions, 0 deletions
diff --git a/base/fast_alloc.hh b/base/fast_alloc.hh
index 7d699abd1..81f2f1359 100644
--- a/base/fast_alloc.hh
+++ b/base/fast_alloc.hh
@@ -68,6 +68,13 @@
// (by bucket).
// #define FAST_ALLOC_STATS
+#ifdef NO_FAST_ALLOC
+
+class FastAlloc {
+};
+
+#else
+
class FastAlloc {
public:
@@ -200,4 +207,6 @@ void FastAlloc::operator delete(void *p, size_t sz)
deallocate(p, sz);
}
+#endif // NO_FAST_ALLOC
+
#endif // __FAST_ALLOC_H__