Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#1181 (win32) memory leak when calling functions of external extension DLLs

None
open
nobody
None
none
1
2014-12-20
2013-05-31
M. Kiewitz
No

I tried this on ooRexx 4.1.1/win32 and ooRexx 4.1.2/win32

It seems that calling functions in external extension DLLs causes memory to leak. The same script (+ same extension DLL code) doesn't cause memory leaks when I use Regina REXX.

Simple script:
/ /

If RxFuncAdd("XtraLoadFuncs", "XtraRexx", "XtraLoadFuncs") <> 0 Then Do
say "Could not load XtraRexx.dll"
exit
End
call XtraLoadFuncs

Do Forever
call XtraSleep 1
End
exit

And XtraSleep (a function that gets added by XtraLoadFuncs) just calling the Win32-API "Sleep"

Will make the rexx.exe process grow around 1.5MB every 30 seconds.

I can send out my XtraRexx.dll in case it's needed, but would prefer to do that via private channel (just use my sourceforge e-mail address).

Discussion

  • M. Kiewitz
    M. Kiewitz
    2014-12-20

    Just a little update on this:

    It doesn't seem to occur on 64-bit Linux.
    I can replicate it with the wpipe1 demo script by simply doing:

    Do Forever
    call Api_Output_From_C
    End

    When I nuke the actual call to the routine:
    functionrc = (int)(*methp)(functionName->getStringData(), count, argPtr, queuename, &funcresult);
    inside NativeActivation.cpp (NativeActivation::callRegisteredRoutine) the leak still happens. When I add a subroutine within the loop inside the script, the leak also still happens.

    EDIT: I just tried the current SVN build and the rexx.exe process grows now up to 24MB and stops growing. Maybe this is meant to be normal behaviour?!

     
    Last edit: M. Kiewitz 2014-12-20


Anonymous


Cancel   Add attachments