search for: dump_alloc_count

Displaying 1 result from an estimated 1 matches for "dump_alloc_count".

2020 Sep 08
0
[libnbd PATCH] hack for testing python closure leaks: NOT FOR COMMIT
...+++ b/generator/Python.ml @@ -578,9 +578,27 @@ let generate_python_methods_c () = pr " PyObject *buf; /* Optional pointer to persistent buffer. */\n"; pr "};\n"; pr "\n"; + pr "static size_t alloc_count;\n"; + pr "void\n"; + pr "dump_alloc_count (void)\n"; + pr "{\n"; + pr " char *cmd;\n"; + pr " if (!alloc_count) return;\n"; + pr " asprintf (&cmd, \"{ echo ' *** alloc_count:%%zu'; cat /proc/%%d/cmdline; } > /dev/tty\",\n"; + pr " alloc_count, get...