aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md16
1 files changed, 16 insertions, 0 deletions
diff --git a/README.md b/README.md
index ef21ed7..971bdf5 100644
--- a/README.md
+++ b/README.md
@@ -53,3 +53,19 @@ are allocated on demand when the current one is full. LARGE allocations each
get their own `mmap` region and are released individually via `munmap`.
All returned pointers are 16-byte aligned.
+
+## Testing
+
+AddressSanitizer (ASan) cannot be used to test this allocator. ASan intercepts
+`malloc`/`free` itself and expects specific allocator metadata (redzones,
+quarantine zones) that a custom allocator does not provide. The two
+implementations would conflict. Since allocations go through `mmap`, they also
+bypass ASan's shadow memory tracking entirely.
+
+Alternatives for catching bugs:
+- **Valgrind** — operates at the binary level without replacing `malloc`, so it
+ can detect issues in the allocator's own internal logic.
+- **Custom tests** — targeted checks for write-after-free, double free, boundary
+ writes, and stress scenarios.
+- **`show_alloc_mem()`** — inspect zone and chunk state visually after
+ operations.