albertz / music-player

Music player - endlessly plays your music
http://albertz.github.io/music-player/
BSD 2-Clause "Simplified" License
492 stars 59 forks source link

avoid swapping memory #39

Open albertz opened 11 years ago

albertz commented 11 years ago

E.g. the player buffer. And the player struct. Maybe other stuff. So that readOutStream will never need to wait for swapped-out memory.

A simple/hacky cross platform solution would be to frequently (or after certain events) force a read on all important data.

To force the data to not-be-swapped-out, there is mlock and co on Linux, BSDs and MacOSX.

albertz commented 11 years ago

Doesn't really work that well. Still hiccups after sleep. Indicates that it still does swap-out.