View Single Post
Old 07-20-2016, 10:56 PM
TriPolar TriPolar is offline
Join Date: Oct 2007
Location: rhode island
Posts: 38,138
Originally Posted by Reply View Post
How would you do that? Unload files from disk, load only part of the program into memory, write new updater unpacker thing to another part of the memory, run that, unload the original, write new files, etc.?
Without ridiculous levels of complexity you will load new code into memory separate from the original code that is running. When it's completely loaded the old code transfers control to the new code. It doesn't matter what part of the code that is, the main software functionality, updaters, unpackers, whatever. This gets much easier if the software consists of loosely coupled modules that interact through messaging. I work on high availability systems, we can update massive systems with intermediate code updates without any additional work. We update the loosely coupled modules on the fly with only a small amount of intervention to quiesce running modules or stop interprocess communications. We don't bother attempting to update the core object module on the fly because it's just not practical or necessary.