Tor
0.4.7.0-alpha-dev
|
Header file for shutdown.c. More...
Go to the source code of this file.
Functions | |
void | tor_cleanup (void) |
void | tor_free_all (int postfork) |
Header file for shutdown.c.
Definition in file shutdown.h.
void tor_cleanup | ( | void | ) |
Do whatever cleanup is necessary before shutting Tor down.
Definition at line 58 of file shutdown.c.
void tor_free_all | ( | int | postfork | ) |
Free all memory that we might have allocated somewhere. If postfork, we are a worker process and we want to free only the parts of memory that we won't touch. If !postfork, Tor is shutting down and we should free everything.
Helps us find the real leaks with sanitizers and the like. Also valgrind should then report 0 reachable in its leak report (in an ideal world – in practice libevent, SSL, libc etc never quite free everything).
Definition at line 109 of file shutdown.c.
Referenced by tor_cleanup().