[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] new interface: memory_object_get_proxy

From: Sergey Bugaev
Subject: Re: [PATCH] new interface: memory_object_get_proxy
Date: Sat, 30 Oct 2021 18:04:27 +0300

On Sat, Oct 30, 2021 at 3:06 PM Sergey Bugaev <bugaevc@gmail.com> wrote:
> But
> memory_object_create_proxy () does add a reference to the memory
> object by doing ipc_port_copy_send (object[0]). It would seem that it
> should not do that; but then I'm not sure why this doesn't cause a
> leak — I know Samuel has ensured that proxies don't cause leaks, at
> least not immediately visible ones.

Aha, that is the exact thing that Samuel has fixed here [0] (and has
mentioned to me at the time).


I was just testing the new version, but looking at the old version of
the source code in my local checkout. Sorry for any confusion that
I've caused by not adding 2 and 2 together.

So yes, you want to take a reference to the pager port while still
holding the lock, and then pass it over to the proxy, which takes
ownership of the port if it returns success — but if it doesn't, you
have to release the reference!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]