Re: Ideas for memory management hackers.

Alexander L. Belikoff (abel@bfr.co.il)
16 Nov 1997 11:15:53 +0200


Moshe Zadka <moshez@ladybug.org.il> writes:

>
> On Fri, Nov 14, 1997 at 03:58:09PM +0100, Alexander Kjeldaas wrote:
> >
> >
> > 4. Implement madvise(). From the NetBSD 1.2 man-page:
> <snipped man-page>
>
> IMHO, a better design would be to set the behavior at the time
> the memory is requested. I.e., a syscall alternative to brk, with
> another argument of behavior.

...except that madvise() is compliant to at least one of the standards
(either BSD or SVR4). And it's generally better, for the portability's
sake, to stick to some standard instead of producing one more.

Another solution would be:

1. To implement a system call with many arguments handling all
nitty-gritty of the memory allocation policy.

2. To implement madvise() in terms of the aforementioned system call.

-- 
-Alexander

============================================================================== Alexander L. Belikoff abel@bfr.co.il Berger Financial Research Ltd. =============================================================================