Hi!

This question was answered as part of another conversation 1-2 years ago however I totally forgot and due to its relative complexity I simply wish to ask it again as to have it set in stone:


In OpenBSD's current absence of a Unified Buffer Cache, is there any trick that I can apply to use a read-only mmap() for quickly reading data, but fwrite() to do the writing, and this way get mmap's speed benefits for the reading but still not be under any risk of breaking my data by unintended writes?


I guess if it would be possible, then it would be done through that I would ensure that the reading (via memory access) and writing (fwrite()) activities would be *temporally separated*, and between each such block, I would need to put some kind of code that would do some kind of flush/reset as to force the mmap to get updated with the latest writes.

Possible, if so how?


Thanks!
Tinker

Reply via email to