diff options
Diffstat (limited to 'linker/linker_main.cpp')
-rw-r--r-- | linker/linker_main.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/linker/linker_main.cpp b/linker/linker_main.cpp index b0c27dcd6..7486cd79b 100644 --- a/linker/linker_main.cpp +++ b/linker/linker_main.cpp @@ -503,6 +503,10 @@ static ElfW(Addr) linker_main(KernelArgumentBlock& args, const char* exe_to_load fflush(stdout); #endif + // We are about to hand control over to the executable loaded. We don't want + // to leave dirty pages behind unnecessarily. + purge_unused_memory(); + ElfW(Addr) entry = exe_info.entry_point; TRACE("[ Ready to execute \"%s\" @ %p ]", si->get_realpath(), reinterpret_cast<void*>(entry)); return entry; |