Array Index Out Of Range in ORG.FindPtrFlds
> Ich bin mir nicht ganz sicher, aber sollte es nicht so heissen? > > > ELSIF typ.form = ORB.Array THEN FindPtrFlds(typ.base, off, dcw) END Nope. You need *all* pointer locations across *all* array elements .. otherwise the garbage collector will not find find all pointer locations. So for an array of N=3 records with pointer offsets 3, 37, 62 within each record, and a record size of S = 100 bytes, one needs the offsets 3, 37, 62, 103, 137, 162, 203, 237, 262. Obviously, for large arrays the number of pointer locations can quickly exceed the value of ORG.maxTD. One way to avoid storing the *same* offsets *N times* would be to store them in compact form, for example as [N = 3, S = 100, 3, 37, 62]. But then one also needs to adapt Kernel.Mark so it can interpret this format. Due to the possibility of recursive data structures, this is complex. Been there. Doable. But not recommendable.. PS: An alternative is to extend the intrinsic procedure NEW to allow NEW(p), where p is an array of pointers. That’s what I use in Extended Oberon. In the PO 2013 2013 version I have found no better solution than to (temporarily) increase ORG.maxTD :-(
Hello: is there a separate BlackBox mailing list anymore? Otherwise let me report that DemoUart does not compile under BlackBox 1.7.2007 (core) downlaoded from CPC, because CommV24 is using BYTE, while DemoUart is using SHORTCHAR. In CommV24 we see: PROCEDURE SendByte (c: Connection; x: BYTE); PROCEDURE SendBytes (c: Connection; IN x: ARRAY OF BYTE; beg, len: INTEGER); In DemoUart we see: CommV24.SendChars (passConn, SHORT (msg), 0, LEN (msg$)); ... which does not compile, of course. Thanks, Wojtek
On Sun, Oct 24, 2021 at 2:36 PM Skulski, Wojciech <skulski@pas.rochester.edu> wrote:
is there a separate BlackBox mailing list anymore? Otherwise let me report that DemoUart does not compile under BlackBox 1.7.2007 (core) downlaoded from CPC, because CommV24 is using BYTE, while DemoUart is using SHORTCHAR.
The mailing list has been replaced by a forum: https://community.blackboxframework.org/index.php You can report bugs here: https://community.blackboxframework.org/viewforum.php?f=48 Regards, Chris https://www.astrobe.com
participants (3)
-
Andreas Pirklbauer -
Chris Burrows -
Skulski, Wojciech