|
1 | 1 | // Export one of the malloc libraries.
|
2 | 2 |
|
3 |
| -#[cfg(feature = "malloc_hoard")] |
4 |
| -pub use self::hoard::*; |
5 | 3 | #[cfg(feature = "malloc_jemalloc")]
|
6 | 4 | pub use self::jemalloc::*;
|
7 |
| -#[cfg(not(any( |
8 |
| - feature = "malloc_jemalloc", |
9 |
| - feature = "malloc_mimalloc", |
10 |
| - feature = "malloc_hoard", |
11 |
| -)))] |
| 5 | +#[cfg(not(any(feature = "malloc_jemalloc", feature = "malloc_mimalloc",)))] |
12 | 6 | pub use self::libc_malloc::*;
|
13 | 7 | #[cfg(feature = "malloc_mimalloc")]
|
14 | 8 | pub use self::mimalloc::*;
|
@@ -48,24 +42,8 @@ mod mimalloc {
|
48 | 42 | pub use mimalloc_sys::mi_malloc_usable_size as malloc_usable_size;
|
49 | 43 | }
|
50 | 44 |
|
51 |
| -#[cfg(feature = "malloc_hoard")] |
52 |
| -mod hoard { |
53 |
| - // Normal 4K page |
54 |
| - pub const LOG_BYTES_IN_MALLOC_PAGE: u8 = crate::util::constants::LOG_BYTES_IN_PAGE; |
55 |
| - // ANSI C |
56 |
| - pub use hoard_sys::{calloc, free, malloc, realloc}; |
57 |
| - // Posix |
58 |
| - pub use hoard_sys::posix_memalign; |
59 |
| - // GNU |
60 |
| - pub use hoard_sys::malloc_usable_size; |
61 |
| -} |
62 |
| - |
63 | 45 | /// If no malloc lib is specified, use the libc implementation
|
64 |
| -#[cfg(not(any( |
65 |
| - feature = "malloc_jemalloc", |
66 |
| - feature = "malloc_mimalloc", |
67 |
| - feature = "malloc_hoard", |
68 |
| -)))] |
| 46 | +#[cfg(not(any(feature = "malloc_jemalloc", feature = "malloc_mimalloc",)))] |
69 | 47 | mod libc_malloc {
|
70 | 48 | // Normal 4K page
|
71 | 49 | pub const LOG_BYTES_IN_MALLOC_PAGE: u8 = crate::util::constants::LOG_BYTES_IN_PAGE;
|
|
0 commit comments