I also had a look a few months back, and although there isn't much memory in the RCX there would probably be enough for a half-decent garbage collector. Of course, there would be a reasonably large amount of overhead so the number of objects you can have active would be quite a lot less than now. The problems I ran into were more to do with resolving what is and isn't a reference on the stack.
In the end, I played around with the memory management code (to try to address the problems of determining references) but didn't get started on the garbage collector itself. I got it back to a working state in the emulator, but kept getting crashes when running on the RCX. I got frustrated trying to find the bug and took a break. I keep meaning to revisit it. I'd be happy to discuss my thoughts so far. > Hi, > > I took a look at the source code quite a while ago to implement a garbage > collector for the RCX version of lejos. I ended up with that it would not > be difficult to implement, but that there was not enough memory in the > RCX. If someone wants to work on with this for the NXT I can share my > findings (I would have to take a new look at this, but it would not take > much time for me). I will not work on this, because I have no NXT yet (and > will not by one for the next year). > > Also I implemented a small file-system based on the PersistentMemoryArea > (which also was useless with such less memory). I can take a look, if I > find the code, if someone wants to go into this. > > Regards, > > Arne ----------------------------------------- Email sent from www.ntlworld.com Virus-checked using McAfee(R) Software Visit www.ntlworld.com/security for more information ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Lejos-discussion mailing list Lejos-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lejos-discussion