Joan Lledó, le sam. 30 oct. 2021 08:38:23 +0200, a ecrit: > > I don't think you can access the entry once you've unlocked the map. > > > > You're probably right b/c it doesn't seem the entry is being accessed after > the lock release in any other place of the code.
You have to, yes. The problem is what if another threads tries to unmap the address range concurrently. You want to keep the lock held until you acquired a ref on the memory object. Then you are safe: the ref guarantees that the memory object won't disappear. And from the rest of the discussion it seems you indeed need such a ref, which you'll just transfer to the creation of the proxy. Samuel