With the aid of Boehm's GC in leak-detecting mode I have established that dvdauthor is leaking a lot of memory.
The biggest leak is VOBU sectors. FindVobus reads all VOBU sectors of a
domain (I think) into memory; FixVobus edits and writes them back; and
they are then dead but never freed. This change:
--- dvdauthor-0.6.11.orig/src/dvdvob.c~ 2006-10-08 00:25:56.000000000 +0100
+++ dvdauthor-0.6.11/src/dvdvob.c 2006-10-08 00:43:42.000000000 +0100
@@ -1575,6 +1575,7 @@
}
}
buf=vi->sectdata;
+ vi->sectdata=0;
memset(buf+0x2d,0,0x400-0x2d);
memset(buf+0x407,0,0x7ff-0x407);
@@ -1707,6 +1708,7 @@
lseek(h,vi->fsect*2048,SEEK_SET);
write(h,buf,2048);
+ free(buf);
curvob++;
if( !(curvob&15) )
fprintf(stderr,"STAT: fixing VOBU at %dMB (%d/%d,
%d%%)\r",vi->sector/512,curvob+1,totvob,curvob*100/totvob);
-- END --
reduces the maximum VM size of dvdauthor in my test case from 300 MB to
65 MB. I don't expect that this will make much difference for discs
with a single titleset, though. (My test case has 31 titlesets each
containing 1 title.)
There are still other substantial leaks, so this patch by itself will
not fix this bug.
Ben.
--
Ben Hutchings -- [EMAIL PROTECTED] shortened to [EMAIL PROTECTED]
If you've signed my GPG key, please send a signature on and to the new uid.
I'm not a reverse psychological virus. Please don't copy me into your sig.
signature.asc
Description: This is a digitally signed message part

