[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
21-fyi-mem-leak.patch
From: |
Akim Demaille |
Subject: |
21-fyi-mem-leak.patch |
Date: |
Sat, 29 Dec 2001 15:14:58 +0100 |
Index: ChangeLog
from Akim Demaille <address@hidden>
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.
Index: src/LR0.c
--- src/LR0.c Fri, 28 Dec 2001 16:47:09 +0100 akim
+++ src/LR0.c Fri, 28 Dec 2001 17:00:40 +0100 akim
@@ -113,6 +113,7 @@
shiftset = XCALLOC (short, nsyms);
redset = XCALLOC (short, nrules + 1);
state_hash = XCALLOC (state_t *, STATE_HASH_SIZE);
+ shift_symbol = XCALLOC (short, nsyms);
}
@@ -154,7 +155,6 @@
for (i = 0; i < nsyms; i++)
kernel_size[i] = 0;
- shift_symbol = XCALLOC (short, nsyms);
nshifts = 0;
for (i = 0; i < nitemset; ++i)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- 21-fyi-mem-leak.patch,
Akim Demaille <=