Re:Multicore OCaml: Feb 2020 update
by throwaway894345 on Friday February 28, 2020 @04:04PM
(#22446345)
If you want conventional shared memory parallelism, then your allocations can't assume thread-locality.
[ Parent
| on HN ]
Re:Multicore OCaml: Feb 2020 update
by chrisseaton on Friday February 28, 2020 @04:05PM
(#22446354)
> If you want conventional shared memory parallelism, then your allocations can't assume thread-locality.
I don't really understand why not. Can you expand on it? Doesn't the JVM for example do thread-local allocations in a conventional shared-memory parallel environment?
Re:Multicore OCaml: Feb 2020 update
by throwaway894345 on Friday February 28, 2020 @04:56PM
(#22446788)
I was mistaken; wasn't thinking clearly as I responded. JVM can get away with this because it's generational/moving; bump allocator works in the young generation and then objects are subsequently moved. Generational/moving is tricky, especially with C APIs (if the GC moves an object that C has a pointer to, the C code dereferencing the pointer will find potentially garbage data) and I believe they make it difficult to get good STW times, but at this point I'm pretty well out of my depth.