What is the difference between a direct and indirect leak?

The LSan wiki design document states: Another useful feature is being able to distinguish between directly leaked blocks (not reachable from anywhere) and indirectly leaked blocks (reachable from other leaked blocks). Stated another way, indirect leaks are a result of direct leaks. Fixing direct leaks should make the indirect leaks become either fixed or direct … Read more

How to diagnose a Java 8 metaspace leak?

The main cause for the java.lang.OutOfMemoryError: Metaspace is: either too many classes or too big classes being loaded to the Metaspace. If you want to recreate the problem use this code snippet: public class Metaspace { static javassist.ClassPool cp = javassist.ClassPool.getDefault(); public static void main(String[] args) throws Exception { for (int i = 0; ; … Read more

Gdb dump memory in specific region, save formatted output into a file

You could use the “dump” function of gdb, see: https://sourceware.org/gdb/onlinedocs/gdb/Dump_002fRestore-Files.html For your example: dump binary memory result.bin 0x200000000 0x20000c350 This will give you a plain binary dump int file result.bin. You can also use the following to dump it in hex format: dump ihex memory result.bin 0x200000000 0x20000c350 Using the dump command is much clearer … Read more

The Best Memory Leak Definition [closed]

There are two definitions (at least for me): Naive definition: Failure to release unreachable memory, which can no longer be allocated again by any process during execution of the allocating process. This can mostly be cured by using GC (Garbage Collection) techniques or detected by automated tools. Subtle definition: Failure to release reachable memory which … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)