For about a year now, my (Windows, Vista) system has ground to a complete stop for no apparent reason.  A couple of months ago, I discovered that it was when a background ooRexx program I have (that pulls down weather-related data that I am collected) came across a 'large' movie file (about 5 MB).   I assumed this was due to something in the Windows TCP/IP stack .. but I am now fairly sure it is a base Rexx interpreter problem.

Essentially, as the file is read from the web, the function involved reads 1000 bytes at a time using SockRecv and appends that to an existing variable (initialized to an empty string).  After it gets to about 3 or 4 MB long, disk utilization goes up to 100% and some time after that the program dies with Error 5 .. System resources exhausted.

How can this be?  There is little else running, I have 2 GB of RAM, and during the copy and assign there is at most 8 or 9 MB of memory needed.

Here's a simple test program:

/* Test program showing concat problem */
got=''
piece=copies('1234567890', 100)    -- 1K
do h=1 to 400                      -- 400 lots of 250K
  do p=1 to 250                    -- 250 pieces of 1K
    got=got||piece
    end p
  say 'Accumulated' length(got) 'bytes'
  end h
say 'OK.'

And running it shows:

d:\}sysexhaust
Accumulated 250000 bytes
Accumulated 500000 bytes
Accumulated 750000 bytes
Accumulated 1000000 bytes
Accumulated 1250000 bytes
Accumulated 1500000 bytes
Accumulated 1750000 bytes
Accumulated 2000000 bytes
Accumulated 2250000 bytes
Accumulated 2500000 bytes
Accumulated 2750000 bytes
Accumulated 3000000 bytes
Accumulated 3250000 bytes
Accumulated 3500000 bytes
Accumulated 3750000 bytes
Accumulated 4000000 bytes
Accumulated 4250000 bytes
Accumulated 4500000 bytes
     8 *-*     got=got||piece
Error 5 running M:\D\tools\sysexhaust.rex line 8:  System resources exhausted
Ready(-5);  E=2:02 3:54pm (10:54 EDT)
d:\}

This fails on both Vista and XP.   ooRexx version is 3.1.2.

Mike





Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU