Is swap really needed when RAM's aplenty

JB jb.1234abcd at gmail.com
Fri Aug 20 20:05:38 UTC 2010


Michael Hennebry <hennebry <at> web.cs.ndsu.nodak.edu> writes:

> 
> > If I remember my Kerningham-Ritchie correctly, the answer is yes, since
> > C relies on pointer arithmetic to refer to the elements of the array.
> > The "fred" and "greg" variables are pointers to the beginning of the
> > corresponding memory area, and referring fred[i] goes to the start of
> > the array at fred, and then goes i elements forward to end up with the
> > wanted element.
> 
> That is contiguous in terms of virtual memory.
> Adjacent virtual addresses do not have to have adjacent physical addresses.
> 
Hi,
http://www.patentstorm.us/patents/6986016/description.html
...
For application (that is, user-mode) programming, standard APIs provided for
memory allocation are malloc ( ) and realloc ( ). In both cases, the contiguity
of the underlying physical memory is not guaranteed. Consequently, these calls
are not suitable for use in cases in which contiguous physical memory is
required.
...
JB






More information about the users mailing list