3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 17:15:31 +00:00

Merge branch 'unstable' of https://git01.codeplex.com/z3 into unstable

This commit is contained in:
Nikolaj Bjorner 2013-04-11 13:44:30 -07:00
commit a054b099c1
13 changed files with 39 additions and 41 deletions

View file

@ -122,7 +122,7 @@ public:
if (m_data) {
if (CallDestructors)
destroy_elements();
a.deallocate(size(), raw_ptr());
a.deallocate(space(size()), raw_ptr());
m_data = 0;
}
}

View file

@ -21,6 +21,7 @@ Revision History:
#define _SMALL_OBJECT_ALLOCATOR_H_
#include"machine.h"
#include"debug.h"
class small_object_allocator {
static const unsigned CHUNK_SIZE = (8192 - sizeof(void*)*2);
@ -52,8 +53,8 @@ public:
inline void * operator new(size_t s, small_object_allocator & r) { return r.allocate(s); }
inline void * operator new[](size_t s, small_object_allocator & r) { return r.allocate(s); }
inline void operator delete(void * p, size_t s, small_object_allocator & r) { r.deallocate(s,p); }
inline void operator delete[](void * p, size_t s, small_object_allocator & r) { r.deallocate(s,p); }
inline void operator delete(void * p, small_object_allocator & r) { UNREACHABLE(); }
inline void operator delete[](void * p, small_object_allocator & r) { UNREACHABLE(); }
#endif /* _SMALL_OBJECT_ALLOCATOR_H_ */