Marc Weber wrote:
You try realloc and if the new pointer is a different one you fail -
causing all callback functions to be called maybe accessing memory
which may have been overridden by other threads because realloc allowed
it to be reused.

So if uw_malloc returns memory blocks which you can reuse in those
handlers than its a bug.

None of the callbacks introduced by the compiler itself will ever touch memory in the context-local heaps (which is the kind of memory that uw_malloc() manages). If you follow this same rule in the callbacks you introduce with your FFI code, everything will be fine.

This sounds like another fact that I should add to the manual. Thanks for pointing it out. :)

_______________________________________________
Ur mailing list
[email protected]
http://www.impredicative.com/cgi-bin/mailman/listinfo/ur

Reply via email to