autocommit 2022-04-07 17:31:31 CEST
This commit is contained in:
parent
1d33088dba
commit
be32036824
200 changed files with 3267 additions and 2479 deletions
26
src/leaks.rs
26
src/leaks.rs
|
|
@ -8,8 +8,7 @@ macro_rules! track {
|
|||
|
||||
#[cfg(not(feature = "rc_tracking"))]
|
||||
mod leaks {
|
||||
use crate::client::ClientId;
|
||||
use std::marker::PhantomData;
|
||||
use {crate::client::ClientId, std::marker::PhantomData};
|
||||
|
||||
pub fn init() {
|
||||
// nothing
|
||||
|
|
@ -40,14 +39,21 @@ mod leaks {
|
|||
|
||||
#[cfg(feature = "rc_tracking")]
|
||||
mod leaks {
|
||||
use crate::client::ClientId;
|
||||
use crate::utils::ptr_ext::{MutPtrExt, PtrExt};
|
||||
use ahash::{AHashMap, AHashSet};
|
||||
use backtrace::Backtrace;
|
||||
use std::alloc::{GlobalAlloc, Layout};
|
||||
use std::marker::PhantomData;
|
||||
use std::{any, mem, ptr};
|
||||
use uapi::c;
|
||||
use {
|
||||
crate::{
|
||||
client::ClientId,
|
||||
utils::ptr_ext::{MutPtrExt, PtrExt},
|
||||
},
|
||||
ahash::{AHashMap, AHashSet},
|
||||
backtrace::Backtrace,
|
||||
std::{
|
||||
alloc::{GlobalAlloc, Layout},
|
||||
any,
|
||||
marker::PhantomData,
|
||||
mem, ptr,
|
||||
},
|
||||
uapi::c,
|
||||
};
|
||||
|
||||
#[thread_local]
|
||||
static mut MAP: *mut AHashMap<u64, Tracked> = ptr::null_mut();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue