Lock executables and shared libraries in memory to improve system responsiveness under low-memory conditions