> There was also is a bug in the allocator (dubbed "memory alligator” here > on the mailing list), which I am not sure whether it is already fixed in the > official sources. A failed allocation can cause the linked list of free memory > segments to get corrupted, which may result in a freeze or other corruption > related artifacts later. As an FYI: On my system, detecting the double trap only works with the “memory alligator” fix also implemented in module Kernel, for example as follows: PROCEDURE GetBlock128(VAR p: LONGINT); VAR q: LONGINT; BEGIN IF list1 # 0 THEN p := list1; SYSTEM.GET(list1+8, list1) ELSE GetBlock(q, 256); IF q > 0 THEN SYSTEM.PUT(q+128, 128); SYSTEM.PUT(q+132, -1); SYSTEM.PUT(q+136, list1); list1 := q + 128 END ; p := q END END GetBlock128; PROCEDURE GetBlock64(VAR p: LONGINT); VAR q: LONGINT; BEGIN IF list2 # 0 THEN p := list2; SYSTEM.GET(list2+8, list2) ELSE GetBlock128(q); IF q > 0 THEN SYSTEM.PUT(q+64, 64); SYSTEM.PUT(q+68, -1); SYSTEM.PUT(q+72, list2); list2 := q + 64 END ; p := q END END GetBlock64; PROCEDURE GetBlock32(VAR p: LONGINT); VAR q: LONGINT; BEGIN IF list3 # 0 THEN p := list3; SYSTEM.GET(list3+8, list3) ELSE GetBlock64(q); IF q > 0 THEN SYSTEM.PUT(q+32, 32); SYSTEM.PUT(q+36, -1); SYSTEM.PUT(q+40, list3); list3 := q + 32 END ; p := q END END GetBlock32;
participants (1)
-
Andreas Pirklbauer