<body><div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000;text-align: left" dir="ltr">
                                        <span style="font-size: 13.3333px">Hmm... 1024 bytes in a ByteArray will be 1029 bytes on disk. So it's okay, I suppose. Interestingly, a DoubleByteArray is use 5142 bytes on disk. A WordArray uses 4101 bytes hmm... okay. Strange for the DoubleByteArray though...</span><br><div class="mb_sig"></div><blockquote class='history_container' type='cite' style='border-left-style:solid;border-width:1px; margin-top:20px; margin-left:0px;padding-left:10px;'>
                        <p style='color: #AAAAAA; margin-top: 10px;'>Am 23.11.2022 11:13:09 schrieb Marcel Taeumel <marcel.taeumel@hpi.de>:</p><div style='font-family:Arial,Helvetica,sans-serif'><div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000;text-align: left" dir="ltr">
                                        Aha! Thanks for the clarification! :-)<div><br></div><div>Best,</div><div>Marcel</div><div class="mb_sig"></div><blockquote class='history_container' type='cite' style='border-left-style:solid;border-width:1px; margin-top:20px; margin-left:0px;padding-left:10px;'>
                        <p style='color: #AAAAAA; margin-top: 10px;'>Am 23.11.2022 03:54:55 schrieb David T. Lewis <lewis@mail.msen.com>:</p><div style='font-family:Arial,Helvetica,sans-serif'>On Tue, Nov 22, 2022 at 10:58:09AM +0100, Marcel Taeumel wrote:<br>> Hi all --<br>> <br>> Should the following work?<br>> <br><br>No, it should not work. And yes, it will lock up the image (confirmed<br>on Linux 64-bit).<br><br><br>> class := DoubleByteArray.<br>> size := 10.<br>> dummy := 123.<br>> <br>> array := class new: size.<br>> array?? atAllPut: dummy.<br>> <br>> (DataStream newFileNamed: 'numbers')<br>> nextPut: array;<br>> close.<br>> <br>> stream := DataStream fileNamed: 'numbers'.??<br>> load := stream readArray.<br>> stream close.<br>> load explore<br>> <br><br>DataStream>>readArray is a private method that will do bad things<br>if you call it at the wrong time. In the example above, it reads<br>a number from the wrong place in the stream (because it should not<br>have been called at that point). This number is used to allocate<br>an array with over 150 million 8-byte slots, leading to the apparent<br>image lockup.<br><br>The fix would be to put the private methods into a method category<br>labeled "private".<br><br>Dave<br><br><br></div></blockquote>
                                        </div></div></blockquote>
                                        </div></body>