<div dir="ltr">I&#39;m reading a 20MB text file. At some point it tries to convert the 20 MB ByteString into an 80 MB WideString using forward become. This fails resulting in an endless loop. The primitive failure code for elementsForwardIdentityTo: (primitive 72) is  #&#39;insufficient object memory&#39; and it tries again after growing:<div><span class="" style="white-space:pre"><br></span></div><div><span class="" style="white-space:pre">        </span>ec == #&#39;insufficient object memory&#39; ifTrue:<br></div><div><div><div><span class="" style="white-space:pre">                </span>[Smalltalk garbageCollect &lt; 1048576 ifTrue:</div><div><span class="" style="white-space:pre">                        </span>[Smalltalk growMemoryByAtLeast: 1048576].</div><div><span class="" style="white-space:pre">                </span> ^self elementsForwardIdentityTo: otherArray].</div></div><div><br></div><div>but the growMemoryByAtLeast: does not actually grow the memory:</div><div><br></div><div><div><span class="" style="white-space:pre">        </span>{Smalltalk garbageCollect.</div><div><span class="" style="white-space:pre">        </span>Smalltalk growMemoryByAtLeast: 1048576.</div><div><span class="" style="white-space:pre">        </span>Smalltalk garbageCollect.}</div></div><div><br></div><div>==&gt;  #(58576608 16777216 58576608)</div><div><br></div><div>58 MB are not enough, but it doesn&#39;t grow any further.</div><div><br></div><div>The question is, why does it try to allocate a new object at all? The WideString exists already. I thought Spur would simply install a forwarder?</div><div><br></div><div>To reproduce, execute </div><div><br></div><div><span style="white-space:pre">        </span>(ByteString new: 20000000) writeStream nextPut: (Character value: 128169)<br></div><div><br></div><div>You probably want to follow that with a user interrupt (Cmd-period).</div><div><br></div><div>This happens using the latest Spur VM from github (r201606160944)</div></div><div><br></div><div>- Bert -</div></div>