]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Call event_set_mem_functions during initialization
authorrl1987 <rl1987@sdf.lonestar.org>
Tue, 4 Sep 2018 18:39:11 +0000 (21:39 +0300)
committerrl1987 <rl1987@sdf.lonestar.org>
Sun, 9 Sep 2018 15:58:03 +0000 (18:58 +0300)
changes/ticket8415 [new file with mode: 0644]
src/core/mainloop/main.c

diff --git a/changes/ticket8415 b/changes/ticket8415
new file mode 100644 (file)
index 0000000..992e8e1
--- /dev/null
@@ -0,0 +1,4 @@
+  o Minor features (memory management):
+    - Get libevent code to use the same memory allocator that
+      Tor code is using by calling event_set_mem_functions()
+      during initialization. Resolves ticket 8415.
index 781e093d90eb6d7e5604df2e779dfbf9636403d5..0a9d4d83e063ca9930a8f6e9643e2394e8349c29 100644 (file)
@@ -4242,6 +4242,11 @@ tor_run_main(const tor_main_configuration_t *tor_cfg)
                strerror(-bt_err));
     }
   }
+
+#ifdef EVENT_SET_MEM_FUNCTIONS_IMPLEMENTED
+  event_set_mem_functions(tor_malloc_, tor_realloc_, tor_free_);
+#endif
+
   init_protocol_warning_severity_level();
 
   update_approx_time(time(NULL));