From: Bob D. <bd...@si...> - 2005-06-06 14:30:52
|
Patch applied! > One left however is in rpdf.c, > the call to rpdf_text is leaving allocations on the slist: > > ==14555== 13627 bytes in 32 blocks are still reachable in loss record 28 > of 32 > ==14555== at 0x1B904A80: malloc (vg_replace_malloc.c:131) > ==14555== by 0xAA7A56: g_malloc (in /usr/lib/libglib-2.0.so.0.400.8) > ==14555== by 0xAA8C03: g_mem_chunk_alloc (in > /usr/lib/libglib-2.0.so.0.400.8) > ==14555== by 0xAB675C: (within /usr/lib/libglib-2.0.so.0.400.8) > ==14555== by 0xAB5CB1: g_slist_append (in > /usr/lib/libglib-2.0.so.0.400.8) > ==14555== by 0x1B945607: rpdf_stream_append (rpdf.c:142) > ==14555== by 0x1B94764B: rpdf_text (rpdf.c:798) > ==14555== by 0x1BD74545: pdf_print_text (pdf.c:113) > ==14555== by 0x1BD650EF: rlib_layout_text_string (layout.c:323) > ==14555== by 0x1BD66C9C: rlib_layout_report_output_array > (layout.c:820) > ==14555== by 0x1BD672C7: rlib_layout_report_outputs_across_pages > (layout.c:951) > ==14555== by 0x1BD67302: rlib_layout_report_output (layout.c:961) > ==14555== by 0x1BD63A73: rlib_layout_report (reportgen.c:571) > ==14555== by 0x1BD63F1D: rlib_layout_part_td (reportgen.c:668) > ==14555== by 0x1BD6416A: rlib_layout_part_tr (reportgen.c:715) > ==14555== by 0x1BD64503: rlib_make_report (reportgen.c:800) > > Since I'm not a glib guru (actually I've not coded in C since 1997) > I'm not certain what's going wrong here, I added the call > to g_slist_free in rpdf_free however it didn't fix the problem. Hym.... I see in your new patch you freed the page_contents in RPDF which looks like the right thing to do to fix the problem. I'm going to go w/ that patch you have now since it fixes a lot of things. I'll poke it a bit further and see why valgrind still complains. GLIB doesn't always sys free on a glib free call and valgrind doesn't know about this so its harder to find mem leaks.. let me poke @ it. - bob |