Skip to content

andreeaa-10/Memory-allocator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Memory allocator

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.

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages