On Wed, Nov 7, 2012 at 9:26 AM, Staffan Tylen <staffan.ty...@gmail.com>wrote:

> During some testing I've run into a problem using the progressHandler
> connection method in ooSQLite. Consider the following code snippet:
>
> expose count
> ...
> count=0
> conn~progressHandler(self, 1)
> conn~exec(sql_stmt)
> say count
> ...
> ::method progressCallBack
> expose count
> count+=1
> return 0
>
> For a 'small' sql statement it works fine but for a 'bigger' one (i.e.
> more work involved) it terminates with:
>
> Error 5 running  line 0: System resources exhausted
> Error 5.000:  The NIL object
>
> So it looks like there is some sort of memory leak in the process, could
> that be?



It is not technically a memory leak, but there is the potential for a lot
of Rexx objects being created that are not garbage collected until the
exec() method ends.  This could cause the working set for Rexx to get very
large and raise the error.

There is definitely an improvement that needs to be done here.

Open a bug and I'll implement some improvements.

Even after I make a change, I expect that you'll find  that a value of 1 is
way to small for the number of virtual machine instructions to be executed
between each callback.  Calling back into Rexx after every virtual machine
instructions is certain to introduce a lot of over-head.

If you would have a small test program you can send me for this, it would
help.  ;-)

--
Mark Miesfeld
------------------------------------------------------------------------------
LogMeIn Central: Instant, anywhere, Remote PC access and management.
Stay in control, update software, and manage PCs from one command center
Diagnose problems and improve visibility into emerging IT issues
Automate, monitor and manage. Do more in less time with Central
http://p.sf.net/sfu/logmein12331_d2d
_______________________________________________
Oorexx-users mailing list
Oorexx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-users

Reply via email to