[Openmcl-devel] process-run-function and mach ports usage

Kevin Reid kpreid at switchb.org
Fri Feb 25 05:44:28 PST 2011


On Feb 24, 2011, at 22:40, Gary Byers wrote:

> I'm not sure that I understand the question.
>
> Ignoring the part about conflating reference and retention, do you  
> think
> it's appropriate for the kernel to increment the port's reference  
> count,
> send a message, wait for a reply, and never decremement the  
> reference count ?
> Unless the recipient of the message takes responsibility for  
> releasing the
> reference, the reference count will just increase on every exception  
> and
> the port will never be deallocated, leading to the original problem.

Again, please note that I have no experience with Mach ports (merely  
some thinking about resource management and communication among  
dissimilar systems).

I say that it is a reasonable design decision for the kernel to have a  
*consistent* policy of "all objects which are arguments in messages  
shall have their reference counts incremented", particularly so if  
there are also messages for which there is no reply/end-of-handler- 
execution (in which case, not incrementing leaves the kernel no  
reliable information of when the object may be disposed of).

-- 
Kevin Reid                                  <http://switchb.org/kpreid/>




More information about the Openmcl-devel mailing list