1

Is there anyway to get rid of the data in RAM without powering off the system? or better to say how we can reduce the chance of getting meaning full information from the volatile memory while the system still is on?

closed as unclear what you're asking by Polynomial, Steve, Tobi Nary, Anders, ThoriumBR Sep 21 '17 at 14:34

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • simply fill up the ram with new data that you need not hide. – dandavis Sep 20 '17 at 0:09
  • 1
    Which OS? Are you the developer of the application you're trying to erase the memory contents of? – Polynomial Sep 20 '17 at 9:57
  • @Polynomial The OS is not the matter, I can do it either on Windows or Linux. This is part of university project, in which I need to develop a program to erase the memory contents. I have to make sure that whole data are deleted from the RAM not data of a specific application. – Mah Sep 20 '17 at 15:51
  • @dandavis Do you have any efficient suggestion for filling the RAM, is there any specific function for this? – Mah Sep 20 '17 at 16:27
  • @Mah The problem is highly OS-specific because "unused" has different meanings in every operating system. In general no OS will leave available RAM completely empty because it's inefficient not to use it as disk cache. Blindly overwriting this is very likely to cause a crash or corrupted system stage. The only safe way to wipe all RAM is to reboot - even if you bring your system down to a minimal state with only your "clear RAM" code running, you still need that "clear RAM" code to be in memory during that process. – Polynomial Sep 20 '17 at 16:33
-1

Since you do not mention OS: http://man7.org/linux/man-pages/man3/bzero.3.html - it's fairly ubiquitous.

Use explicit_bzero() to avoid the compiler accidentally trimming away your wipe for whatever reason. If you kill off the sensitive program and fork a few processes that each gobble say, 512M, you have achieved what you need. Remember to unmount swap first - even before running your sensitive program.

You can set the children to each chunk as much memory as you like. The reaper will clean them up when they hit memory limits.

Not the answer you're looking for? Browse other questions tagged or ask your own question.