mirror of
https://github.com/Z3Prover/z3
synced 2025-08-08 20:21:23 +00:00
add missing locks around mpz operations that access object allocator. Use internal skolem constant for theory assumption to hide it from models
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
0ddbd32a42
commit
a0efdc21c3
3 changed files with 11 additions and 3 deletions
|
@ -68,6 +68,8 @@ void small_object_allocator::reset() {
|
|||
|
||||
#define MASK ((1 << PTR_ALIGNMENT) - 1)
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
void small_object_allocator::deallocate(size_t size, void * p) {
|
||||
if (size == 0) return;
|
||||
|
||||
|
@ -92,6 +94,7 @@ void small_object_allocator::deallocate(size_t size, void * p) {
|
|||
m_free_list[slot_id] = p;
|
||||
}
|
||||
|
||||
|
||||
void * small_object_allocator::allocate(size_t size) {
|
||||
if (size == 0) return 0;
|
||||
|
||||
|
@ -100,8 +103,9 @@ void * small_object_allocator::allocate(size_t size) {
|
|||
return memory::allocate(size);
|
||||
#endif
|
||||
m_alloc_size += size;
|
||||
if (size >= SMALL_OBJ_SIZE - (1 << PTR_ALIGNMENT))
|
||||
if (size >= SMALL_OBJ_SIZE - (1 << PTR_ALIGNMENT)) {
|
||||
return memory::allocate(size);
|
||||
}
|
||||
#ifdef Z3DEBUG
|
||||
size_t osize = size;
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue