On Wed Jan 31 18:01:42 2024 +0000, Jinoh Kang wrote:
Should we then be worried that mmap will go through NT virtual memory
management unnoticed? That could be a problem, yes, if PE side accesses the mapping directly. We could avoid this by just shifting everything accessing the mapping to the Unix side. In case PE-side access becomes *ever* necessary/critical for performance, then we can start considering pooling at that point.
Of course, I guess this exact snippet will break right at `NtClose( handle );`which will destroy the mapping. But it is not the core problem even, that can probably be worked around somehow, just it seems obvious to me that doing lower level management of Nt objects behind the back of their implementation leaves them in a broken state and we'll have to keep that in mind and workaround on various occasions, it just doesn't worth mixing those.