[GC] Porting boehm-gc to RTEMS for GCJ
Joel Sherrill
joel.sherrill at gmail.com
Wed Jul 13 07:22:38 PDT 2011
On Wed, Jul 13, 2011 at 9:03 AM, Jie Liu <lj8175 at gmail.com> wrote:
> Hi,
>
> If I don't port "Thread support"[1] for RTEMS operating system while
> porting GCJ to it, can I run multiple thread which created in Java ?
RTEMS has the non-POSIX task suspend and resume. These
add an additional blocking state to a thread's state. They are
very lightweight. Would these be suitable to implement the following?
GC_stop_world()
Stops all threads which may access the garbage collected heap,
other than the caller.
GC_start_world()
Restart other threads.
> I ask this question because: if a RTEMS GCJ program with multiple
> threads but no memory allocation in threads, the program can run
> successfully. And if has memory allocation in threads, the program may
> fail, e.g. new char[660] PASS but new char[680] and more will FAIL in
> new thread. The cause of the error is wrong jump address such as
> 0xFF0720FF or hanging in the program while stack error.
I personally don't understand the memory layout requirements in
general terms for GC. RTEMS does not have a main so there
is no main stack. Thread stack sizes are fixed and don't grow.
What is the relationship between the various types of memory?
Where does it come from?
> [1]http://www.hpl.hp.com/personal/Hans_Boehm/gc/porting.html
>
> Thanks,
> Jie
And thanks again.
--joel sherrill
More information about the Gc
mailing list