lkml.org 
[lkml]   [1998]   [Oct]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: Out Of Memory in v. 2.1
    Hi Matthew, 

    On Sat, 3 Oct 1998, Matthew Hawkins wrote:

    > > -----------------------------------
    > > #include <stdlib.h>
    > >
    > > main()
    > > {
    > > while(1)
    > > {
    > > if( malloc(2048) == 0)
    > > sleep(1);
    > > }
    > > }
    > > -----------------------------------
    >
    > Somebody slap me if I'm missing something obvious, but shouldn't this have
    > absolutely no effect on the system whatsoever until the allocated memory is
    > written to? Was the copy-on-write protection taken out of the kernel?

    Normally this pages are written to, because there is some administrative
    data at the start of the memory block. This way the first page is usually
    written to automatically.

    cu
    Torsten



    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:44    [W:0.019 / U:0.292 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site