3 ms·
> mremap(), I assume Yes, with ftruncate(), see the link above. The problem is Windows doesn't have an ftruncate() that works while the file is open and being
by wickedchicken 14y ago
> mremap(), I assume
Yes, with ftruncate(), see the link above. The problem is Windows doesn't have an ftruncate() that works while the file is open and being written to. (Note: my memory is a little fuzzy here, it might be that there was no implementation that took a file descriptor instead of a filename, either way I couldn't pull it off).
As for your 'zero-copy dump memory into a file after-the-fact' idea, I'm sure it's done somewhere. My brain is too frizzled right now to scrounge up how though :).
- beagle3 14y agoWhen I was still following the kernel mailing lists, there were discussions about how to achieve this for sockets, and none about files, so that would surprise me. However, if there is a way to achieve that without forking, I would be very happy to hear.