tor  0.4.2.1-alpha-dev
Functions
shutdown.h File Reference

Go to the source code of this file.

Functions

void tor_cleanup (void)
 
void tor_free_all (int postfork)
 

Detailed Description

Header file for shutdown.c.

Definition in file shutdown.h.

Function Documentation

◆ tor_cleanup()

void tor_cleanup ( void  )

◆ tor_free_all()

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.