From 38a5f0950250ad21e48ad60c1036621c58ecd9d4 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 11 Apr 2007 13:18:25 +0000 Subject: r12349@catbus: nickm | 2007-04-11 09:18:15 -0400 Add code to shrink the cell memory pool by discarding empty chunks that have been empty for the last 60 seconds. Also, instead of having test.c duplicate declarations for exposed functions, put them inside #ifdef foo_PRIVATE blocks in the headers. This prevents bugs where test.c gets out of sync. svn:r9944 --- src/or/or.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/or/or.h') diff --git a/src/or/or.h b/src/or/or.h index 048e6793c..9ecf46d63 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -2137,6 +2137,11 @@ int or_state_save(time_t now); int getinfo_helper_config(control_connection_t *conn, const char *question, char **answer); +#ifdef CONFIG_PRIVATE +/* Used only by config.c and test.c */ +or_options_t *options_new(void); +#endif + /********************************* connection.c ***************************/ const char *conn_type_to_string(int type); @@ -2406,6 +2411,14 @@ int decode_hashed_password(char *buf, const char *hashed); void disable_control_logging(void); void enable_control_logging(void); +#ifdef CONTROL_PRIVATE +/* Used only by control.c and test.c */ +size_t write_escaped_data(const char *data, size_t len, + int translate_newlines, char **out); +size_t read_escaped_data(const char *data, size_t len, + int translate_newlines, char **out); +#endif + /********************************* cpuworker.c *****************************/ void cpu_init(void); @@ -2669,6 +2682,7 @@ extern uint64_t stats_n_data_bytes_received; void init_cell_pool(void); void free_cell_pool(void); +void clean_cell_pool(void); void cell_queue_clear(cell_queue_t *queue); void cell_queue_append(cell_queue_t *queue, packed_cell_t *cell); @@ -2885,6 +2899,11 @@ void router_reset_warnings(void); void router_reset_reachability(void); void router_free_all(void); +#ifdef ROUTER_PRIVATE +/* Used only by router.c and test.c */ +void get_platform_str(char *platform, size_t len); +#endif + /********************************* routerlist.c ***************************/ /** Represents information about a single trusted directory server. */ -- cgit v1.2.3