On Tue, 04 Apr 2000, Paul Barton-Davis wrote:
> >From the man page for munlock:
> 
>        munlock  reenables  paging  for  the  memory  in the range
>        starting at addr with length len bytes.  All  pages  which
>        contain  a  part  of  the specified memory range can after
>        calling munlock be moved to external swap space  again  by
>        the kernel.
> 
> This is *not* the desired behaviour! When I munlock the part of the
> track file that we've passed over, I don't want it to be paged out, I
> want to forget about it. Ick. I guess I need to unmap it as well, to
> indicate that I am really and truly finished with it and that it is no
> longer in use. For some reason, I imagined that just unlocking it
> would be enough, but I now see that the kernel still thinks I'm
> interested in it. mlock marked some pages of the VM space as
> non-pageable, and munlock marks as pageable. Totally symmetric, but I
> didn't treat it that way.
> 
> Gosh. Talk about a memory leak.

Oops...

Well, you might still want to think about my previous post - although
you should have plenty of disk speed to cover that without any
special treatment... (Also, ext2 *might* be smart enough to do sector
allocation in a way that matches the size of the write operations. We
should either look at the code, or ask some fs guru for a quick
answer.)


//David


.- M u C o S --------------------------------. .- David Olofson ------.
|          A Free/Open Multimedia            | |     Audio Hacker     |
|      Plugin and Integration Standard       | |    Linux Advocate    |
`------------> http://www.linuxdj.com/mucos -' | Open Source Advocate |
.- A u d i a l i t y ------------------------. |        Singer        |
|  Rock Solid Low Latency Signal Processing  | |      Songwriter      |
`---> http://www.angelfire.com/or/audiality -' `-> [EMAIL PROTECTED] -'

Reply via email to