openAllocatorLibrary static method

DynamicLibrary openAllocatorLibrary()

Implementation

static ffi.DynamicLibrary openAllocatorLibrary() {
  if (Platform.isWindows) return ffi.DynamicLibrary.open('msvcrt.dll');
  if (Platform.isMacOS || Platform.isIOS) return ffi.DynamicLibrary.process();
  if (Platform.isLinux || Platform.isAndroid) {
    try {
      return ffi.DynamicLibrary.open('libc.so.6');
    } catch (_) {
      return ffi.DynamicLibrary.process();
    }
  }
  return ffi.DynamicLibrary.process();
}