I have fixed the problem with the gc scanner recursing into a stack overflow.
I made three changes:
1) There is a recursion limit for scan_object after which it changes strategy
2) if there is only one pointer in an object, use tail recursion optimisation:
this allows scanning a long list without any recursion.
3) if we hit the recursion limit, the pointers are added to a Judy1Array instead
of being scanned. The mark routine then has an appendum which grabs
pointers out of that array and scans them until the array is empty.
The scan can add more entries into the array, however real pointers
only get scanned once (due to mark detector in scan_object).
UNFORTUNATELY whilst this fixed the list example.. it didn't make any
difference to my "ls" command .. that still crashes ;(
--
john skaller
[email protected]
------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand
malware threats, the impact they can have on your business, and how you
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Felix-language mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/felix-language