varnum can be augmented by other allocator. Keep track

of a local varnum (lvarnum) in each allocator.
* src/misc/bddalloc.cc (bdd_allocator::bdd_allocator): Initialize
lvarnum.
(bdd_allocator::extvarnum): New method.
(bdd_allocator::allocate_variables): Use lvarnum and extvarnum.
* src/misc/bddalloc.hh (bdd_allocator::extvarnum): New mathod.
(bdd_allocator::lvarnum): New variable.
This commit is contained in:
Alexandre Duret-Lutz 2003-08-15 01:20:57 +00:00
parent 519a67babc
commit 256d800580
2 changed files with 30 additions and 8 deletions

View file

@ -21,10 +21,14 @@ namespace spot
void release_variables(int base, int n);
static bool initialized; ///< Whether the BDD library has been initialized.
static int varnum; ///< number of variable in use in the BDD library.
static int varnum; ///< number of variables in use in the BDD library.
int lvarnum; ///< number of variables in use in this allocator.
typedef std::pair<int, int> pos_lenght_pair;
typedef std::list<pos_lenght_pair> free_list_type;
free_list_type free_list; ///< Tracks unused BDD variables.
private:
/// Require more variables.
void extvarnum(int more);
};
}