On Fri, Oct 27, 2017 at 5:19 PM, Richard Hipp <d...@sqlite.org> wrote:
> On 10/27/17, Richard Hipp <d...@sqlite.org> wrote:
>>
>> (2) Memory leaks do not usually matter in Fossil, since each command
>> runs to completion and the process dies, leaving the OS to clean up
>> any memory.  Only memory leaks inside of a loop make a difference.


Thanks for the clarification.

I guess the memleak could be an issue when serving Markdown documents
repeatedly, as from within the "ui" or "server" web server loop, as in
doc_page():

    Blob tail = BLOB_INITIALIZER;
    markdown_to_html(&filebody, &title, &tail);

I cannot find any call to blob_reset() for neither filebody nor tail.

Obviously, this is not a big issue unless the Fossil web server
handles heavy traffic of big Markdown documents - which isn't its main
purpose anyway. :-)

Best Regards,
Johan

>
> Another way to think of this:  The memory will be garbage collected by
> the exit() function.  :-)
>
> --
> D. Richard Hipp
> d...@sqlite.org
> _______________________________________________
> fossil-users mailing list
> fossil-us...@lists.fossil-scm.org
> http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
_______________________________________________
fossil-dev mailing list
fossil-dev@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/fossil-dev

Reply via email to