Move the free_list management into a separate class for reuse.
* src/misc/freelist.hh, src/misc/freelist.cc: New files. * src/misc/Makefile.am (misc_HEADERS, libmisc_la_SOURCES): Add them. * src/misc/bddalloc.hh (bdd_allocator): Inherit from free_list and make dump_free_list visible. * src/misc/bddalloc.cc (bdd_allocator::allocate_variables): Move all the code into free_list::register_n() and bdd_allocator::extend(), and call the former. (bdd_allocator::release_variables): Move all the code into free_list::release_n() and call it. (bdd_allocator::extend): New method. * src/tgba/bdddict.cc (bdd_dict::dump): Call dump_free_list;
This commit is contained in:
parent
b84e6a6440
commit
cf6602a3be
7 changed files with 228 additions and 86 deletions
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (C) 2003 Laboratoire d'Informatique de Paris 6 (LIP6),
|
||||
// Copyright (C) 2003, 2004 Laboratoire d'Informatique de Paris 6 (LIP6),
|
||||
// département Systèmes Répartis Coopératifs (SRC), Université Pierre
|
||||
// et Marie Curie.
|
||||
//
|
||||
|
|
@ -269,9 +269,7 @@ namespace spot
|
|||
to_string(fi->first, os) << "]" << std::endl;
|
||||
}
|
||||
os << "Free list:" << std::endl;
|
||||
free_list_type::const_iterator i;
|
||||
for (i = free_list.begin(); i != free_list.end(); ++i)
|
||||
os << " (" << i->first << ", " << i->second << ")";
|
||||
dump_free_list(os);
|
||||
os << std::endl;
|
||||
return os;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue