1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//! A memory-hardening drop-in allocator for Linux.
//!
//! compatmalloc provides defense-in-depth heap protection as either an
//! `LD_PRELOAD` interposer (C/C++ programs, no recompilation needed) or a
//! Rust `#[global_allocator]` (`CompatMalloc`, requires the
//! `global-allocator` feature).
//!
//! # Quick Start (Rust)
//!
//! ```rust,ignore
//! use compatmalloc::CompatMalloc;
//!
//! #[global_allocator]
//! static GLOBAL: CompatMalloc = CompatMalloc;
//! ```
//!
//! # Quick Start (C/C++ via LD_PRELOAD)
//!
//! ```bash,ignore
//! LD_PRELOAD=libcompatmalloc.so ./your_program
//! ```
// Internal modules — not part of the public API.
pub
pub
pub
pub
pub
pub
pub
pub
pub
pub
/// Test-support re-exports. Hidden from docs.
/// NOT part of the public API; may change without notice.
pub use CompatMalloc;