From: Jay Levitt Date: 2007-10-20T08:20:01+09:00 Subject: Re: [OT] Re: Should *most* memory be release back to the system? On Sat, 20 Oct 2007 04:55:18 +0900, Michal Suchanek wrote: > On 19/10/2007, M. Edward (Ed) Borasky wrote: >> Now the killer is this: the platform (hardware and OS) designers make a >> bunch of compromises so that you can get "acceptable" performance for a >> lot of different languages -- compiled or interpreted, static memory >> allocation or dynamic memory allocation, explicit memory >> allocation/deallocation or garbage collection, etc. And the language >> designers make a bunch of compromises so that you can get "acceptable" >> performance on modern operating systems. It's almost as if the two types >> of designers communicate with each other only every fifteen years or so. > > I cannot imagine what else you can do when you want an OS that runs > pretty much all languages. All that the OS can do is hand out pages, > and only the language runtime can manage the data inside those pages. > Unless you tailor the OS to one specific language or virtual machine > you cannot get anything more. There was a paper a few years ago on the idea of a GC that could communicate with the virtual memory manager, so that it could sweep pages when they happened to be already swapped in, rather than intentionally pulling them in purely to do the sweep. Or something along those lines; the key is that right now, you have no way to know if accessing an address will produce a page fault. It makes a lot of sense. I always assume that big VSZs (at least in garbage-collected apps) are bad because they lead to eventual paging, but I don't know nearly enough to prove or even investigate that. As for the forking, I concur with the crowd. It's certainly much cheaper than it used to be, but not-forking will always be cheaper than forking, and that's why it's gone out of favor - though if the downside leads to catastrophic* edge cases, that's not so hot either. *I can't remember the word I'm looking for, and neither can thesaurus.com, and it's the second time in two days I've needed it. You know the word I mean. Non-linear, extreme, unpleasantly surprising behavior at the edges, knee-of-the-curve. Can anyone? New thread or e-mail, please; let's not hijack this! -- Jay Levitt | Boston, MA | My character doesn't like it when they Faster: jay at jay dot fm | cry or shout or hit. http://www.jay.fm | - Kristoffer