You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I developed a custom memory allocator in C that efficiently manages dynamic memory allocations using a metadata structure for each memory block.
It supports both malloc and calloc, and implements techniques for managing fragmentation, including coalescing free blocks to reduce external fragmentation.
Overview
Memory Management Strategies
Used brk() for small allocations and mmap() for large allocations.
Implemented best-fit allocation to minimize fragmentation.
Block splitting and coalescing to optimize memory reuse.
Performance Enhancements
Heap preallocation to reduce syscall overhead.
Metadata structure (block_meta) for tracking memory blocks efficiently.
Memory alignment (8 bytes) for better access performance.
About
I developed a custom memory allocator in C that efficiently manages dynamic memory allocations using a metadata structure for each memory block. It supports both malloc and calloc, and implements techniques for managing fragmentation, including coalescing free blocks to reduce external fragmentation.