ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
cadical_arena.cpp
Go to the documentation of this file.
1#include "global.h"
2
3#include "internal.hpp"
4
6
7namespace CaDiCaL {
8
10 memset (this, 0, sizeof *this);
11 internal = i;
12}
13
15 delete[] from.start;
16 delete[] to.start;
17}
18
19void Arena::prepare (size_t bytes) {
20 LOG ("preparing 'to' space of arena with %zd bytes", bytes);
21 CADICAL_assert (!to.start);
22 to.top = to.start = new char[bytes];
23 to.end = to.start + bytes;
24}
25
26void Arena::swap () {
27 delete[] from.start;
28 LOG ("delete 'from' space of arena with %zd bytes",
29 (size_t) (from.end - from.start));
30 from = to;
31 to.start = to.top = to.end = 0;
32}
33
34} // namespace CaDiCaL
35
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
#define CADICAL_assert(ignore)
Definition global.h:14
#define LOG(...)
Arena(Internal *)
void prepare(size_t bytes)
char * memset()