<div align="center">
# ◈ MEMKIT CORE ◈
### `[ DETERMINISTIC CPU ALLOCATION ENGINE ]`
[](https://crates.io/crates/memkit)
[](https://docs.rs/memkit)
[](../LICENSE.md)
[](https://www.rust-lang.org/)
---
```
██████╗ ██████╗ ██████╗ ███████╗
██╔════╝██╔═══██╗██╔══██╗██╔════╝
██║ ██║ ██║██████╔╝█████╗
██║ ██║ ██║██╔══██╗██╔══╝
╚██████╗╚██████╔╝██║ ██║███████╗
╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝
```
> *"Predictable memory is the foundation of reliable systems."*
**The core engine of the Memkit ecosystem, providing thread-local arenas, object pools, and sub-nanosecond allocation logic.**
[`◈ QUICK START`](#◈-quick-start) • [`◈ ADVANTAGE`](#◈-the-memkit-advantage) • [`◈ SENTINEL`](#◈-sentinel-mode)
</div>
---
## ◈ THE MEMKIT ADVANTAGE
| **Cost** | O(Varies) | **O(1)** | Stable frame times |
| **Locality** | Random | **Contiguous** | SIMD/Cache efficient |
| **Safety** | Drop-based | **Bulk Reset** | Zero-cost cleanup |
| **Threads** | Contention | **Lock-Free** | Linear scaling |
| **Debug** | Standard | **Sentinel** | Hazard detection |
---
## ◈ SENTINEL MODE
Enable the `sentinel` feature for memory hardening.
```toml
[dependencies]
memkit = { version = "0.2.0-beta.1", features = ["sentinel"] }
```
```
┌─────────────────────────────────────────────────────────────────────────┐
│ ◆ POISONING │ Fills allocs with 0xAA and frees with 0xDD. Catch │
│ │ use-after-free instantly. │
├─────────────────────────────────────────────────────────────────────────┤
│ ◆ HAZARDS │ Runtime reporting of double-frees and cross-thread │
│ │ ownership violations. │
├─────────────────────────────────────────────────────────────────────────┤
│ ◆ AUDIT │ Verifies zero leaks on shutdown with detailed report. │
└─────────────────────────────────────────────────────────────────────────┘
```
---
## ◈ QUICK START
```rust
use memkit::{MkAllocator, MkConfig};
let alloc = MkAllocator::new(MkConfig::default());
loop {
alloc.begin_frame();
// O(1) Allocation - zero fragmentation
let buffer = alloc.frame_slice::<f32>(1024).unwrap();
let entity = alloc.frame_box(PhysicsEntity::new()).unwrap();
// Pool allocation for stable objects
let pool_obj = alloc.pool_box(Component::new()).unwrap();
alloc.end_frame(); // Bulk reset
}
```
---
## ◈ ECOSYSTEM
| `memkit` | Core engine | **BETA 1.1** |
| [`memkit-gpu`](../memkit-gpu) | GPU Buffer Management | **BETA 1.1** |
| [`memkit-co`](../memkit-co) | CPU↔GPU Synchronization | **BETA 1.1** |
| [`memkit-async`](../memkit-async) | Task-local Async Safety | **BETA 1.1** |
---
## ◈ LICENSE
Licensed under the **Mozilla Public License 2.0**.
---
<div align="center">
**[ Part of the ◈ MEMKIT ◈ Ecosystem ]**
</div>