On Wednesday 17 January 2007 10:15, Juergen Stuber wrote: > Hallo Arne, > > Arne Limburg <[EMAIL PROTECTED]> wrote: > > 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. > > me too. > > I figured out some years ago that fully real-time GC could be done > with an overhead of two pointers per object and a kB or two of code, > but that the RCX had too little memory to make it worthwhile.
I think I have a basic grip of the idea here: Instead of pointers we have a table of pointers accessed via handles. Thus the pointers in the table can be fiddled with without hurting the objects. That is pretty straight forward I think, except for one scenario. Do we ever pass pointers into the VM that get used a synchronously? If so then the pointers cannot be gc'd while they are in use. For example: sensor = new I2CSensor(); // Has an internal buffer sensor.startRead(); ...... // gc happens here if(sensor.done()) ... If the gc shift the sensor and the low level C code has a pointer into the buffer, then chaos will happen. ------------------------------------------------------------------------- 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