GC suspend all???

Maxim Kizub M.Kizub at post.skynet.lt
Sat Nov 25 07:57:52 PST 2000


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello kaffe,

Does kaffe suspends all threads in order
to process GC? If yes - is it possible to
modify GC to walk by small steps, i.e.
process a part of objects, return, then
process next set of objects, return, and
so on...
I'm going to use java as scripting language
in 3D game, and performing full gc scan
will likely skip a frame or two of output,
that is _highly_ unwanted, since with
smooth 3D drawing skipped frames are
well seen by human eyes...

What about this schema:
1. Allocate static array, huge one, let's name
it "Object gc_used[1024x1024];"

2. Set a pointer to the begin of this array,
let's name it "Object* gc_used_ptr = gc_used;"

3. Each assignment of a reference type to
field or array like
obj1.field = obj2;
adds in code right before assignment
gc_used_ptr = obj2;
gc_used_ptr++;

4. When GC starts next cycle, it process
pointers in gc_used (up to gc_used_ptr), and
then continue to process another set of
objects (for example, a 10000 objects),
then stops and return.

5. When all objects processed - it processes
stacks.


- --
Best regards,
 Maxim                            mailto:M.Kizub at post.skynet.lt

-----BEGIN PGP SIGNATURE-----
Version: PGP 6.5i

iQA/AwUBOh/Teuw5enpENJF+EQJT6QCg9ZDBpSkJaan2a3X6biAFHWydjRgAn2tB
qfmCTlv9m4BUBRdSPgR+215i
=0dgd
-----END PGP SIGNATURE-----




More information about the kaffe mailing list