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

mikel evins mevins at me.com
Thu Feb 24 09:25:44 PST 2011


On Feb 24, 2011, at 11:08 AM, Shannon Spires wrote:

> But Apple is a major commercial company that (usually) seems to try to get things right. That's why the Mach leak is a surprise.

As I recall, the resource being knowingly leaked was VM pages. If I recall correctly, Avie's argument was that in "normal use" it would take months for pages leaked at the "normal" rate to have any noticeable effect on the performance of a Mach-based system, and the designers of the OS thought that was an acceptable tradeoff in return for some speed advantages.

The problem we observed was that database vendors were using the NeXT Indexing Kit, which in turn used VM in a way not really anticipated by the designers of Mach, so that pages were leaked a few orders of magnitude faster than "normal". The fix was to make a tiny change to Indexing Kit to get the leakage rate back closer to "normal".

As I said, if I had a point, it was that we can't just assume Mach (or another OS, for that matter) doesn't leak resources. If it matters whether resources get leaked, we have to find out what the OS actually does. I'm not picking on Mach here; one company I worked for had analogous issues to deal with in using Linux, and another one encountered issues with Windows XP that would make for a fairly funny "Coding Horror" kind of story.



More information about the Openmcl-devel mailing list