Click here to Skip to main content
15,888,454 members
Articles / Programming Languages / C++

Replace malloc/free with a Fast Fixed Block Memory Allocator

Rate me:
Please Sign up or sign in to vote.
4.80/5 (25 votes)
21 Jan 2024CPOL15 min read 90.4K   1.6K   56  
Replace malloc/free with xmalloc/xfree is faster than the global heap and prevents heap fragmentation faults.
In this article, the C library malloc/free is replaced with alternative fixed memory block versions xmalloc() and xfree(). First, the underlying Allocator storage recycling method is briefly explained followed by an explanation of how xallocator works.

Views

Daily Counts

Downloads

Weekly Counts

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
United States United States
I've been a professional software engineer for over 20 years. When not writing code, I enjoy spending time with the family, camping and riding motorcycles around Southern California.

Comments and Discussions