another memory usage experiment! scripts+results: https://gist.github.com/thejh/6eddd199d71f5e5a221b827c7aa2a271 … this one is to see how many pages of present/swapped memory are completely within free malloc chunks, and wrote a script to MADV_DONTNEED that memory away (but don't run that on any machine you care about!)
-
-
you can do simpler than that ;-) all you need to call is malloc_trim(0) at key points, and this happens safely (properly locked etc) for example, right before going to a poll() waiting for events.
-
oooh! interesting, it actually calls MADV_DONTNEED. I only looked at the manpage for that function before, and the manpage incorrectly claims "This function cannot release free memory located at places other than the top of the heap"
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.