Memory leak in flex generated file

Pierre Innocent <pierreir@look.ca>
Mon, 20 Aug 2007 17:59:14 -0400

          From comp.compilers

Related articles
[3 earlier articles]
Re: Memory leak in flex generated file johnmillaway@yahoo.com (John Millaway) (2005-10-26)
Re: Memory leak in flex generated file Markus.Elfring@web.de (2005-10-26)
Re: Memory leak in flex generated file haberg@math.su.se (2005-10-27)
Re: Memory leak in flex generated file haberg@math.su.se (2005-10-27)
Re: Memory leak in flex generated file johnmillaway@yahoo.com (John Millaway) (2005-10-27)
Re: Memory leak in flex generated file johnmillaway@yahoo.com (John Millaway) (2005-10-29)
Memory leak in flex generated file pierreir@look.ca (Pierre Innocent) (2007-08-20)
Re: Memory leak in flex generated file jnvolkov@gmail.com (commander) (2007-08-21)
| List of all articles for this month |
From: Pierre Innocent <pierreir@look.ca>
Newsgroups: comp.compilers
Date: Mon, 20 Aug 2007 17:59:14 -0400
Organization: Tsert Inc.
Keywords: lex
Posted-Date: 20 Aug 2007 23:08:02 EDT

I came across with essentially the same problem.
Here is a section of the valgrind log:


==17231==
==17231== 2,371,104 (11,472 direct, 2,359,632 indirect) bytes in 239
blocks are definitely lost in loss record 51 of 66
==17231== at 0x401C627: malloc (vg_replace_malloc.c:149)
==17231== by 0x80F3842: indexeralloc(unsigned) (lex.indexer.c:17657)
==17231== by 0x80F4041: indexer_create_buffer(_IO_FILE*, int)
(lex.indexer.c:17186)
==17231== by 0x80F40FD: indexerrestart(_IO_FILE*) (lex.indexer.c:17126)
==17231== by 0x80F9128: Indexer::scanFile(String const&, uint32_t)
(indexer.cc:1068)
==17231== by 0x81096A6: main (indexer.cc:2542)
==17231==
==17231==
==17231== 1,573,152 bytes in 98 blocks are possibly lost in loss record
65 of 66
==17231== at 0x401C627: malloc (vg_replace_malloc.c:149)
==17231== by 0x80F3842: indexeralloc(unsigned) (lex.indexer.c:17657)
==17231== by 0x80F4072: indexer_create_buffer(_IO_FILE*, int)
(lex.indexer.c:17195)
==17231== by 0x80F40FD: indexerrestart(_IO_FILE*) (lex.indexer.c:17126)
==17231== by 0x80F9128: Indexer::scanFile(String const&, uint32_t)
(indexer.cc:1068)
==17231== by 0x81096A6: main (indexer.cc:2542)
==17231==
==17231== LEAK SUMMARY:
==17231== definitely lost: 11,532 bytes in 241 blocks.
==17231== indirectly lost: 2,360,292 bytes in 161 blocks.
==17231== possibly lost: 1,678,544 bytes in 570 blocks.
==17231== still reachable: 1,688,164 bytes in 4,486 blocks.
==17231== suppressed: 0 bytes in 0 blocks.
==17231== Reachable blocks (those to which a pointer was found) are not
shown.
==17231== To see them, rerun with: --leak-check=full --show-reachable=yes


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.