Can the JVM overwrite all memory on shutdown

I am working on some application that works with secret data in memory. Is there a way to make sure all memory is overwritten when the JVM shuts down? None of the secret data should be left in memory after the JVM is completed.

+4
source share
2 answers

Short answer: current generations of JVMs cannot guarantee this.

However, if your application is such that it requires these kinds of things, it is difficult to understand how you could implement it in any programming language in a typical modern operating system if you are not working without a removable device. And even then, you probably have to rely on the OS for zero physical memory when you exit the program. (If there are no errors, the OS must have zero memory before transferring it to another process, but I do not think this is indicated when this happens.)

. / , . , "root" , . , !

+6

JVM. (.. ) . , , , , , .

, , ( ) , ( 100%), .

+2

Source: https://habr.com/ru/post/1673087/


All Articles