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
|
|
@ -28,6 +28,7 @@ misc_HEADERS = \
|
|||
bddalloc.hh \
|
||||
bddlt.hh \
|
||||
escape.hh \
|
||||
freelist.hh \
|
||||
hash.hh \
|
||||
minato.hh \
|
||||
version.hh
|
||||
|
|
@ -36,5 +37,6 @@ noinst_LTLIBRARIES = libmisc.la
|
|||
libmisc_la_SOURCES = \
|
||||
bddalloc.cc \
|
||||
escape.cc \
|
||||
freelist.cc \
|
||||
minato.cc \
|
||||
version.cc
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue