lib.rs 610 B

1234567891011121314151617
  1. // Copyright (c) 2016-2018, The Tor Project, Inc. */
  2. // See LICENSE for licensing information */
  3. extern crate libc;
  4. mod smartlist;
  5. pub use smartlist::*;
  6. // When testing we may be compiled with sanitizers which are incompatible with
  7. // Rust's default allocator, jemalloc (unsure why at this time). Most crates
  8. // link to `tor_allocate` which switches by default to a non-jemalloc allocator,
  9. // but we don't already depend on `tor_allocate` so make sure that while testing
  10. // we don't use jemalloc. (but rather malloc/free)
  11. #[global_allocator]
  12. #[cfg(test)]
  13. static A: std::alloc::System = std::alloc::System;