http://GameProgrammer.Com

Programming

GP Mailing List
     Thread Index
     Date Index

ATXGPSIG List
     Thread Index
     Date Index

Google
>

Home

Wise2Food



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gameprogrammer] Re: Scripting engines: Upvalues and function refs



David Olofson wrote:

>>The GC is a  "mark and sweep" one.
>>    
>>
>
>Ouch. A basic mark & sweep GC is a major showstopper in hard RT 
>systems. It has to be some form of incremental variant, so you can 
>control how many cycles it burns before you get back to executing 
>application code.
>
>
>  
>
Yes, it was quite a simple GC, only for soft RT. Usually if you loose a 
frame with soft RT it's not a problem. Of course with hard RT, this 
asumption fails.  I am not sure hard RT can live with garbage 
collection. Maybe with a very fine grain GC that you can precisely 
control (start and stop) and know its execution time.

>> The GC just examines the objects' fields and follows the
>>references. Every time an object is created by the JVM, its
>>reference is added to the "live object" list in the GC. When the GC
>> do its references tracing it move the identified object from the
>>"live objects" list to the "dest list". Finally, the objects
>>remaining in the first list are "dead" objects and can be deleted.
>>    
>>
>
>Problem is that that algorithm breaks down if you interrupt it in the 
>middle, mess around with some objects, and then get back to GC. It 
>gets quite a bit more complicated if you have to do it incrementally 
>(which is required in a hard RT system, unless you can somehow have 
>bounded GC time by other means) - but of course, the basic idea is 
>still the same.
>
>  
>
You could look in the wilson's survey on garbage collection  : 
http://www.cs.colorado.edu/~diwan/class-papers/gcsurvey.ps it's quite 
complete, but maybe you already know it :)

Julien