Ben Morrow wrote this message on Mon, Feb 25, 2013 at 00:28 +0000: > > 1. Such buffers exist during the entire program's lifetime even if they > > aren't actively used/needed by the program. With malloc(3) and friends, > > you're allocating memory dynamically, and you can free(3) when done with > > it, rather than just having a gigantic portion of memory allocated > > sitting around potentially doing nothing. > > If the 'allocated' memory isn't touched, it will never be paged in. Even > once it is paged in, if it then goes back to being unused it can be > paged out to swap (when necessary) and then stay there. (It would be > nice if there were some way to tell the system 'this memory is dead, > don't write it out to swap', but I don't think there is.)
madvise(2) w/ MADV_FREE, though there was some discussion on -current about what these different flags will/should do not too long ago... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." _______________________________________________ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"