memmap 1.1.0 memmap: ^1.1.0 copied to clipboard
A Linux Dart API for memory mapped buffers.
A Linux memory mapped IO.
Features #
- file-backed memory maps
- [] anonymous memory maps
- [] synchronous and asynchronous flushing
- [] copy-on-write memory maps
- [] read-only memory maps
- [] stack support (
MAP_STACK
on unix) - [] executable memory maps
- huge page support
Usage #
var dir = Directory.systemTemp.createTempSync('memmap_test');
var path = dir.path + '/memmap_test.dart';
var file = File(path)..writeAsStringSync('hey');
var mmap = Mmap(path);
var bytes = mmap.asBytes();
expect(bytes, equals(utf8.encode('hey')));
mmap.close();
file.deleteSync();