OS2 World Community Forum

OS/2, eCS & ArcaOS - Technical => Programming => Topic started by: Digi on October 03, 2016, 06:44:38 am

Title: memory leak: libc066, _beginthread()
Post by: Digi on October 03, 2016, 06:44:38 am
Hi.

I have stable memory leak on each thread start. Can anyone confirm this problem? A small test program attached. I see an ever-increasing number of pages "stack" with Theseus:

G:\projects\test>start test.exe

C:\Programs\Theseus>getobj.cmd TEST private 1 0|find /C "stack"
15

C:\Programs\Theseus>getobj.cmd TEST private 1 0|find /C "stack"
17

C:\Programs\Theseus>getobj.cmd TEST private 1 0|find /C "stack"
19

C:\Programs\Theseus>getobj.cmd TEST private 1 0|find /C "stack"
20

C:\Programs\Theseus>getobj.cmd TEST private 1 0|find /C "stack"
23

and so on...
Title: Re: memory leak: libc066, _beginthread()
Post by: Digi on October 03, 2016, 07:08:16 am
Strange... The problem disappeared after reboot.  :o
Title: Re: memory leak: libc066, _beginthread()
Post by: Greg Pringle on October 03, 2016, 07:07:34 pm
I have not run your program but can say the problem does exist if running java 1.6
also tested with theseus4
I wrote a new way to run threads that does not use the runnable interface and it solved the problem.