3 ms·
While not common to run into bugs because of it on unix semantically its a problem all the time. While multiple statically linked C libs normally use the same
by dathinab 4y ago
While not common to run into bugs because of it on unix semantically its a problem all the time.
While multiple statically linked C libs normally use the same allocator, the moment you link in any other language in any way (static,.so) the guarantee is gone.
So you `dart:ffi.allocate` `C-malloc` and rust `std::alloc::alloc` might in the end all use different allocators or might happen to use the same allocator, but as long as you don't carefully control all parts involved the all bets are off.
And it can make a lot of sense to use different allocators in FFI-libraries in some use cases (mainly as a form of optimization).