Subject: Re: CVS commit: src
To: Todd Vierling <firstname.lastname@example.org>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
Date: 09/30/1998 11:13:59
>I've never seen madvise() used to change the behavior of the program; it's
>certainly possible, but I have only seen it used as its advisory function
>(most often on mmaped memory regions used as variable or database storage).
>It is usually there to get a "hopeful performance boost".
I've seen the moral equivalent used on large machines (where "large"
is 1-x orders of magnitude more RAM than a workstation; a box with
half a gig of RAM five years ago), to do time-space tradeoffs.
>And after all of that, there is nowhere a documented guarantee that the
>advice about memory usage actually does anything beneficial, particularly on
>higher load machines.
Uh, that is precisely where the semantic disagreement over "advisory"
is. Does 'advisory' mean reasonable best-effort, or is a total no-op
The manpage doesnt say. I thought it meant backing-store, so that you
know at malloc() time whether you actually get the space you want,
rather than losing when you try and write into a zfod page.
I've seen code which exploits that.
And again, I'm not wedded to one side or the other, just observing
that there's merit to both.