KS2007: Memory management
KS2007: Memory management
Posted Sep 11, 2007 19:20 UTC (Tue) by bronson (subscriber, #4806)Parent article: KS2007: Memory management
> Linus cautioned that these system calls might seem like a nice idea, but that nobody would ever use them. In general, he says, Linux-specific extensions tend not be used.
Does any system currently offer a weak_free call? Sometimes Linux has to be the first to do something. Like FUSE, a pretty notable success. (I know Fuse wasn't the first userspace FS... it's the first general purpose API, though, developed on Linux at first and now being adopted by other OSes).
I can understand why weak_free isn't so attractive on desktop systems where stale data is just paged to disk but it seems really handy on smaller systems: MP3 players, video players, phones, etc. Like vomlehn says.
Shame I don't have time to write the patch. All I can do is say that, yes, I would indeed use it if it existed.
Posted Sep 14, 2007 2:17 UTC (Fri)
by jzbiciak (guest, #5246)
[Link] (1 responses)
Interestingly, HURD does its paging in user-space as I recall. Ah yes:
http://kilobug.free.fr/hurd/pres-en/abstract/html/node9.html
Posted Sep 21, 2007 20:00 UTC (Fri)
by ch (guest, #4097)
[Link]
I may be one of the few people on the planet who wasn't a Mach kernel hacker who has written his own Mach pager. This was an attempt to convince Mach to play better with CMU Common Lisp.
-- Christopher.
Posted Sep 24, 2007 14:38 UTC (Mon)
by stereodee (guest, #47703)
[Link]
How about madvise(2)?
"MADV_FREE - Gives the VM system the freedom to free pages, and tells the system that information in the specified page range is no longer important. This is an efficient way of allowing malloc(3) to free pages anywhere in the address space, while keeping the address space valid. The next time that the page is referenced, the page might be demand zeroed, or might contain the data that was there before the MADV_FREE call. References made to that address space range will not make the VM system page the information back in from backing store until the page is modified again."
http://www.gsp.com/cgi-bin/man.cgi?section=2&topic=ma...
FUSE is a bit different story. I don't need to patch Firefox and Emacs to use files in a FUSE filesystem. I do need to patch every large-memory-footprint application to use the proposed memory-pressure message interface.KS2007: Memory management
The user space pager came from Mach. And may have come from someone else before that.KS2007: Memory management
> Does any system currently offer a weak_free call?KS2007: Memory management
