Hi,
I was trying to trigger GC(garbage collection) in kaffe. As a part of this I added these lines in gc-mem.c
(/home/sita/kaffe-1.0.7/kaffe/kaffevm/mem/gc-mem.c)
size_t count;(global variable) /*added by sita*/
gc_heap_malloc(size_t sz)
{
/*added by sita*/
count = count + sz;
if (count>100000) /* this means if the size of the objects created in the heap exceeds>*/
goto nospace;/*>100000, I want to call Garbage collector and free some of them*/
}
gc_heap_free()
{
/*added by Sita*/
printf("I'm triggering GC\n");
}
When I do the make install with the above code, it installs fine. But when I run a sample program, after a while I get the following error:
I'm triggering GC
I'm triggering GC
I'm triggering GC
I'm triggering GC
Aborted kaffe-bin: jthread.c:1204: jthread_enable_stop: Assertion `currentJThread->stopCounter >= 0' failed
Could anyone please help with the error . Any help with this is highly appreciated.
Hi sita,
If that's all of your code, it seems that after count reaches 100000, a call to gc_heap_malloc will always result in jump to nospace. That might have side effects that you didn't expect ;)
If that doesn't help, check out FAQ.debugging for a short intoduction into debugging kaffe.
on a side note, you may want to give 1.1.4 a try, since it has seen a fair deal of gc updates compared to 1.0.7.
cheers, dalibor topic
_______________________________________________ kaffe mailing list [EMAIL PROTECTED] http://kaffe.org/cgi-bin/mailman/listinfo/kaffe
