Understanding how a RAM disk works

Jim

Understanding how a RAM disk works   25 July 2026, 18:04

I placed a portable app entirely contained in its folder in a RAM disk and ran it. While it was running, I formatted the RAM disk, a process that deleted its contents as expected, yet the app continued running. Obviously, this cannot be magic, so simply out of curiosity, could I ask for a technical explanation that a layperson can understand?
SoftPerfect Support forum - Andrew avatar image

Re: Understanding how a RAM disk works   25 July 2026, 19:02

When Windows runs a program, it doesn't simply fully load the file into memory and hold onto it. It maps the file, then copies bits of it into RAM when they are actually needed. If your app is small, within a second or two everything it needed was already sitting in RAM. The file on disk had become irrelevant.

A format doesn't erase data - it just writes a fresh, empty index. The old bytes are still there, just unlisted. A real-life parallel with a library would be: you burned the library card catalogue, not the books.

So the app kept running from the copy already in memory. It got lucky in your particular case, though: if it had later needed a chunk of code it hadn't touched yet, it would have gone looking for a file that no longer had a home and crashed instantly. And anything it tried to save would have failed too.
Jim

Re: Understanding how a RAM disk works   26 July 2026, 00:52

Quote

you burned the library card catalogue, not the books

- an excellent metaphor. Thank you Andrew.

Reply to this topic

Sometimes you can find a solution faster if you try the forum search, have a look at the knowledge base, or check the software user manual to see if your question has already been answered.

Our forum rules are simple:

  • Be polite.
  • Do not spam.
  • Write in English. If possible, check your spelling and grammar.

Author:

Email:

Subject

A brief and informative title for your message, approximately 4–8 words:

     

Spam prevention: please enter the following code in the input field below.

 **    **  **    **  **    **  ********  ********  
  **  **    **  **   **   **   **    **  **     ** 
   ****      ****    **  **        **    **     ** 
    **        **     *****        **     **     ** 
    **        **     **  **      **      **     ** 
    **        **     **   **     **      **     ** 
    **        **     **    **    **      ********  

Message: