[Gc] Boehm GC and Iphone

Damian damian.pop at gmail.com
Wed Feb 23 06:53:01 PST 2011


Hi Ivan,

Thanks a lot!! I was on vacation last days, but before the weekend I will
test it and tell you how it works.
Another question:
I thought that (in general gc) incremental and generational was the same
thing, but I've been reading that it's not and that incremental is most
suitable for embedded devices because it does not need extra memory.
In boehm gc, incremental and generational is the same thing? can be enabled
separately? how?
Also, how can I control how long a pause can be in incremental mode?
Thanks.

Damian.

2011/2/13 Ivan Maidanski <ivmai at mail.ru>

> Hi Damian,
>
> I've fixed the issue. Now both -strip_dead option and strip(1) don't break
> the executable.
>
> As for options for max speed, I'm personally using:
> gcc -O2 -fno-common -Wall -DNO_EXECUTE_PERMISSION -DALL_INTERIOR_POINTERS
> -DGC_GCJ_SUPPORT -DNO_DEBUGGING -DGC_THREADS -DTHREAD_LOCAL_ALLOC
> -DPARALLEL_MARK -I include -I libatomic_ops/src -c extra/gc.c
>
> In fact, the performance heavily depends on how you use the collector. Some
> advices:
> 1. use atomic malloc whenever possible;
> 2. register only the threads that manipulate GC-sensitive pointers;
> 3. turn off all-interior-pointers if possible;
> 4. if you can manually describe your app static roots then
> GC_set_no_dls(1), GC_clear_roots() and add your roots;
> 5. play with GC_free_space_divisor.
>
> PS. ChangeLog entires (for the patch attached):
>        * mark.c (GC_mark_some): Prefix and suffix "asm" and "volatile"
>        keywords with double underscore.
>        * os_dep.c (GC_unix_get_mem): Reformat the code.
>        * os_dep.c (catch_exception_raise, catch_exception_raise_state,
>        catch_exception_raise_state_identity): Add GC_API_OSCALL to
>        function definition.
>        * os_dep.c (catch_exception_raise_state,
>        catch_exception_raise_state_identity): Move definition to be
>        before GC_ports.
>        * os_dep.c (catch_exception_raise): Declare to have the symbol
>        defined before GC_ports.
>        * os_dep.c (GC_ports): Store references to catch_exception_raise,
>        catch_exception_raise_state, catch_exception_raise_state_identity
>        (to prevent stripping these symbols as dead).
>        * os_dep.c (catch_exception_raise, catch_exception_raise_state,
>        catch_exception_raise_state_identity): Mark these symbols as
>        "referenced dynamically" via an assembler directive (unless
>        NO_DESC_CATCH_EXCEPTION_RAISE).
>        * include/private/gc_priv.h (GC_API_OSCALL): New macro (defined
>        similar to GC_API but as if GC_DLL is always defined).
>
> Regards.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://napali.hpl.hp.com/pipermail/gc/attachments/20110223/29e62ec6/attachment.htm


More information about the Gc mailing list