What happens to RAM if a key is pressed on the computer for too long? Example: computer has been turned on and a key is pressed these bytes are being read by the processor and written in memory, right?
What happens to RAM if a key is pressed on the computer for too long? Example: computer has been turned on and a key is pressed these bytes are being read by the processor and written in memory, right?
Depends on what's running:
If the computer has just been powered on and does not have an operating system, nothing will happen. If you have a Windows and nothing else should also happen nothing important, Windows will process each drive and discard then in a text editor may burst the memory, but may have protections against this. The code that is running is what will determine what to do.
The activation of the key will create what is called interruption in the processor and this will cause a code execution to be diverted to a routine previously determined by some code, almost certainly the operating system that determined what code is a form of callback ), at least this will be the case for normal PCs under appropriate conditions .
The operating system will determine what to do with this key. It can do something simple or complex because of this, it can for example delegate the drive to the applications that are running or to the application that is in the foreground only, and there is problem of the application what to do.
It may be that the application ignores this, or it may not even be ready to receive this notification that a key was pressed, and little will happen. Usually there is a limit to what can be pending and may refuse new triggers or throw away the older ones, or have another action, it is not something that works the same forever. It accepting to receive this signal everything is possible to be done, the code can be well written or poorly written and do something good or bad, occupy memory or not.
In short, pressing the key has nothing to do with memory consumption.