metaeducation / rebol-issues

6 stars 1 forks source link

recycle intermittent #1128

Open rebolbot opened 15 years ago

rebolbot commented 15 years ago

Submitted by: Sunanda

May be related to cc#444

I can make/allocate a very large item that ought to be thrown away immediately. But it persists through several recycles, hampering attempts to allocate other large, temporary items. This could adversely affect REBOL appplications running at the limits of memory.

Console session - it works once, fails twice then works again:

recycle make string! shift 2 29
== ""  
recycle make string! shift 2 29
** Internal error: not enough memory
recycle make string! shift 2 29
** Internal error: not enough memory
recycle make string! shift 2 29
== ""

Code loop for same issue:

for n 1 1000 1 [ recycle if  not error? try [make string! shift 2 29] [print ["worked on " n ] ]]
worked on  1    ;; as expected
worked on  4
worked on  7
worked on  10
worked on  13
worked on  16
worked on  19
worked on  22
worked on  25
worked on  28
ctrl+c
for n 1 1000 1 [ recycle if  not error? try [make string! shift 2 29] [print ["worked on " n ] ]]

CC - Data [ Version: alpha 76 Type: Bug Platform: Windows Category: Unspecified Reproduce: Always Fixed-in:none ]

rebolbot commented 15 years ago

Submitted by: BrianH

Note, this is not related to TRACE/back (I checked). You might have to lower the size of the string allocated depending on the memory limits of your test system, ie. I got the same results with SHIFT 2 27.