I know there are separate GC heaps per thread and there's allocShared-deallocShared, but is it possible to allocated a shared garbage collected data?
I need either garbage collecteur to manage shared pointers live or to implement "hazard pointers" myself like in C for a lock-free algorithm.
I've used lockfree queue in java and the program gained performance boost over a lock-based one, although using java's "synchronized" keyword led to the same performance as the lock-free implementation, probably jvm already uses lock-free technique.
Anyway I don't need it for a real project now, just interested if I could easily translate my queue implementation from java into nimrod to play with and test if it works here. And now I see it won't work.
I have not looked in nimrod message passing implemenentation yet.
And now I see it won't work.
Depends. Freeing a list item uses a lock but you can easily add the node to a free list instead. In fact a GC does not really help for lock free programming if you can live with batch deallocations... ;-)