[fossil-users] blob_zero, empty_blob and blob_reset
Hello, I think that the big amount of memory required by annotate happens due to a memory leak. Using valgrind confirmed me this. I came to a dead-end trying to understand the blob functions. I decide to enable the assert_blob_is_reset(x) And the assertion fails everywhere. I don't know how to initialise a blob. According to this assertion, any blob should be declared with initial value, as in; Blob b = empty_blob; and only then, blob_zero(&b) can work fine. Is it me not understanding, or the total fossil code is full of Blobs not initialised to empty_blob? blob_init requires the blob to be reset. blob_zero requires the blob to be reset. blob_reset requires the blob to be init. The only deadlock exit I see to that is having every blob assigned empty_blob to any blob structure declared. (I keep on working on this... let's see if I can get rid of the leaks after adding many empty_blob). ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] blob_zero, empty_blob and blob_reset
On Sun, Sep 04, 2011 at 10:29:23PM +0200, Lluís Batlle i Rossell wrote: > Hello, > > I think that the big amount of memory required by annotate happens due to a > memory leak. Using valgrind confirmed me this. > > ... > > (I keep on working on this... let's see if I can get rid of the leaks after > adding many empty_blob). I had started a branch annotate_noleak thinking that it would not leak at all, but I notice with a more complex test case that it segfaults. So, it looks like I've misunderstood something. So, don't consider that branch with a working annotate. :) Anyway, I'd like someone to take a look at the heavy leaks, and to get an explanation on how to use blobs (initialise to empty_blob or not or what). Thank you, Lluís. ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users