Source: stackexchange Source: It comment
Suppose you have a debt list, which records the name and amount of your debt owner.
You also have a magic pencil. This pen has a built-in erasure function. If you use it to write somewhere on paper, it can automatically erase the previous words from this place, in this way, only the newly written items are displayed. This is the working principle of computer memory, which is slightly different from the way in our life.
You bought a $5000 car and only paid the first price of $500, so you owe him $4500. He told you that his name is John Smith. You write his name and number of arrearages into the arrears form. Your debt list now looks like this:
Later, you paid off the arrears according to the record on the arrears ticket. You paid 4500 US dollars (plus interest) and deleted this record from the overdue bill. Now your overdue bill has become blank.
Then you borrowed $1000 from others. He tells you his name is John Smith xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx99999999 ". You have written the amount owed (USD 1000) and the name of the creditor (John-simiz xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx9999999999) to your account. Your overdue bill looks like this:
(The last 0 of the $1000 is not erased. This is not important .)
When writing his name, his name cannot be written in the name column, but you continue to write it in the "number of overdue payments" column! This is memory overflow.
Later, the overdue bill reminds you that you still owe $99999999990 to Mr. John Smith XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. You found him and paid off his debt of about $100 billion.
How to explain to a layman what is memory overflow