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
This commit is contained in:
parent
3c6fc7c269
commit
e537fb3fd6
2 changed files with 13 additions and 0 deletions
|
@ -32,6 +32,8 @@
|
||||||
* by permission.
|
* by permission.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef NO_FAST_ALLOC
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
#pragma implementation
|
#pragma implementation
|
||||||
#endif
|
#endif
|
||||||
|
@ -189,3 +191,5 @@ fast_alloc_oldest(int n)
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif // NO_FAST_ALLOC
|
||||||
|
|
|
@ -68,6 +68,13 @@
|
||||||
// (by bucket).
|
// (by bucket).
|
||||||
// #define FAST_ALLOC_STATS
|
// #define FAST_ALLOC_STATS
|
||||||
|
|
||||||
|
#ifdef NO_FAST_ALLOC
|
||||||
|
|
||||||
|
class FastAlloc {
|
||||||
|
};
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
class FastAlloc {
|
class FastAlloc {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
@ -200,4 +207,6 @@ void FastAlloc::operator delete(void *p, size_t sz)
|
||||||
deallocate(p, sz);
|
deallocate(p, sz);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // NO_FAST_ALLOC
|
||||||
|
|
||||||
#endif // __FAST_ALLOC_H__
|
#endif // __FAST_ALLOC_H__
|
||||||
|
|
Loading…
Reference in a new issue