Berkeley YACC
1993-03-03
Berkeley's version of Yet Another Compiler Compiler
|
Functions to reduce the memory footprint. More...
Functions | |
pack_names () | |
pack_symbols () | |
pack_grammar () | |
Functions to reduce the memory footprint.
The functions in this module are used to pack the symbols manipulated by the program, switching from many small allocations to a few big memory chunks. This slightly reduces the memory footprint of the program, while also improving locality, thus incrementing the performance of the subsequent algorithms, which very often need to iterate on the data
pack_grammar | ( | ) |
Definition at line 1680 of file reader.c.
References bucket::assoc, FREE, bucket::index, MALLOC, nitems, no_space(), nrules, prec, bucket::prec, rassoc, REALLOC, ritem, rlhs, rprec, rrhs, start_symbol, TERM, TOKEN, and UNDEFINED.
Referenced by reader().
pack_names | ( | ) |
Definition at line 1507 of file reader.c.
References first_symbol, FREE, MALLOC, bucket::name, name_pool, name_pool_size, bucket::next, no_space(), and strcpy().
Referenced by reader().
pack_symbols | ( | ) |
Definition at line 1553 of file reader.c.
References bucket::assoc, bucket::class, first_symbol, FREE, bucket::index, MALLOC, bucket::name, name_pool, bucket::next, no_space(), nsyms, ntokens, nvars, bucket::prec, start_symbol, symbol_assoc, symbol_name, symbol_prec, symbol_value, TERM, TOKEN, UNDEFINED, shorts::value, and bucket::value.
Referenced by reader().