I am running a Rexx Tcp/Ip program that appears to have a memory leak. I encountered this problem first on 3.2 on 32-bit Windows XP, then installed 4.01 and got the same problem.
While executing a SockRecv loop to receive about 232 megs of data accumulated in a single string, on a Windows XP 32-bit system it eventually runs out of memory. I then ran the program on a 64-bit Windows 7 system (using 64-bit OORexx) and monitored it using Task Manager. I discovered that it used approximately 10.5 Gigs of memory at its peak before finishing with a normal result.
The code is a simple loop that does a SockRecv and then concatenates the data as shown below:
outdata = ''
do while remaining > 0
NumBytes = SockRecv(SockNum, 'InData', remaining)
if NumBytes <= 0 then leave
outdata = outdata || InData
remaining = remaining - NumBytes
Eventually it crashes on a 32-bit system at: outdata = outdata || InData
Is there any way to figure out what is causing, and ultimately fixing, the problem? I cannot routinely use a 64-bit system since I had to borrow one for my 64-bit test.