mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-19 09:13:04 +00:00
Memory leak.
* src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here, since it allocates it for each state, although only one is needed. (allocate_storage): Do it here.
This commit is contained in:
@@ -1,3 +1,12 @@
|
|||||||
|
2001-12-29 Akim Demaille <akim@epita.fr>
|
||||||
|
|
||||||
|
Memory leak.
|
||||||
|
|
||||||
|
* src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
|
||||||
|
since it allocates it for each state, although only one is needed.
|
||||||
|
(allocate_storage): Do it here.
|
||||||
|
|
||||||
|
|
||||||
2001-12-29 Akim Demaille <akim@epita.fr>
|
2001-12-29 Akim Demaille <akim@epita.fr>
|
||||||
|
|
||||||
* src/options.h, src/options.c (create_long_option_table): Rename
|
* src/options.h, src/options.c (create_long_option_table): Rename
|
||||||
|
|||||||
@@ -113,6 +113,7 @@ allocate_storage (void)
|
|||||||
shiftset = XCALLOC (short, nsyms);
|
shiftset = XCALLOC (short, nsyms);
|
||||||
redset = XCALLOC (short, nrules + 1);
|
redset = XCALLOC (short, nrules + 1);
|
||||||
state_hash = XCALLOC (state_t *, STATE_HASH_SIZE);
|
state_hash = XCALLOC (state_t *, STATE_HASH_SIZE);
|
||||||
|
shift_symbol = XCALLOC (short, nsyms);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -154,7 +155,6 @@ new_itemsets (void)
|
|||||||
for (i = 0; i < nsyms; i++)
|
for (i = 0; i < nsyms; i++)
|
||||||
kernel_size[i] = 0;
|
kernel_size[i] = 0;
|
||||||
|
|
||||||
shift_symbol = XCALLOC (short, nsyms);
|
|
||||||
nshifts = 0;
|
nshifts = 0;
|
||||||
|
|
||||||
for (i = 0; i < nitemset; ++i)
|
for (i = 0; i < nitemset; ++i)
|
||||||
|
|||||||
Reference in New Issue
Block a user