It looks like internal memory leak. Especially if leak is ~3KB after 
calling Sablotron 100 times and more.

Can you submit some template and data?

Pavel



[EMAIL PROTECTED] (Sven Neumann) wrote:

> Pavel Hlavnicka wrote:
> > 
> > Your piece of code looks good.
> > 
> > How much of memory get lost per call? Size if buffer obtained via
> > SablotGetResultArg? More or less?
> > 
> Definitely less. A rough estimation is about ~3 KB.
> 
> > Is memory returned after destoying of processor? (SablotDestroyProcessor).
> > 
> > Do you reuse the created threads (probably using some events etc.) or do
> > you create new thread per call? Processor is destroyed when thread is
> > gone? Note, that processor holds memory allocated for buffers until next
> > call to RunProcessor resp. DestroyProcessor.
> 
> I don't reuse the threads. Each threads creates a processor:
> 
>      SablotCreateProcessor (&processor);
> 
> then uses it up to 128 times with the same stylesheet but different
> XML data. When finished the processor is destroyed:
> 
>      SablotDestroyProcessor (processor);
> 
> and the thread finishes.
> 
> Someone suggested calling "SablotFreeResultArgs (processor);" after 
> SablotGetResultArg(), but if I understand the documentation correctly
> this is done automatically on each call of SablotRunProcessor().
> 
> I'm having trouble to debug this threaded monster, so the error might
> as well be somewhere else.
> 
> 
> Salut, Sven

--
Pavel Hlavnicka
Ginger Alliance Ltd.
Prague; Czech Republic


Reply via email to