From d656ec4f644744d866e39794b444ef7bbbac7286 Mon Sep 17 00:00:00 2001 From: Acrimon Date: Wed, 24 Jul 2019 01:43:27 +0200 Subject: [PATCH] Hook the tracking allocator into binaries. Doesn't do any monitoring/logging. Just provides the data when you want it. --- voxygen/Cargo.toml | 1 + voxygen/src/main.rs | 3 +++ 2 files changed, 4 insertions(+) diff --git a/voxygen/Cargo.toml b/voxygen/Cargo.toml index 40a4b51ca7..cada942e50 100644 --- a/voxygen/Cargo.toml +++ b/voxygen/Cargo.toml @@ -58,3 +58,4 @@ frustum_query = "0.1.2" rodio = { git = "https://github.com/desttinghim/rodio.git", rev = "dd93f905c1afefaac03c496a666ecab27d3e391b" } crossbeam = "^0.7.1" fxhash = "0.2" +heaptrack = "0.3.0" diff --git a/voxygen/src/main.rs b/voxygen/src/main.rs index 5aeb53c7bc..8ddf9dce07 100644 --- a/voxygen/src/main.rs +++ b/voxygen/src/main.rs @@ -34,11 +34,14 @@ use crate::{ audio::base::Genre, audio::AudioFrontend, menu::main::MainMenuState, settings::Settings, window::Window, }; +use heaptrack::track_mem; use log::{self, debug, error, info, warn}; use simplelog::{CombinedLogger, Config, TermLogger, WriteLogger}; use std::{fs::File, mem, panic, str::FromStr}; +track_mem!(); + /// A type used to store state that is shared between all play states. pub struct GlobalState { settings: Settings,