Re: [linux-audio-dev] memory leaks with munlock ...

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] memory leaks with munlock ...
From: David Olofson (david_AT_gardena.net)
Date: Wed Apr 05 2000 - 06:04:27 EEST


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 -' `-> david_AT_linuxdj.com -'


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Wed Apr 05 2000 - 06:35:27 EEST