bnoordhuis/node-mmap — Issue #5: FR: Callback when memory is paged in
Author: herby
Created: 2012-02-19 19:34:43+00:00
State: open

I don't know how hard would it be (or if ever possible), but would it be possible to add some function with callback which is called only when the memory is in fact paged in? Otherwise this stops the whole node process.

It is complicated by the fact the part of it can be paged in and part of it not and the whole part could not be there at once, ever.

Maybe something like:

mmapEnsure(file, offset, size, buffer /* from previous mmap call */, wanted, function (err, before, after) {
// now there is interval before...after paged in, before <= wanted <= after
});

(maybe not all args needed since buffer should know the file, offset and size)