Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. C/C++
  3. Hoard

Hoard

Apache-2.0C++3.2

A fast, scalable, and memory-efficient drop-in replacement for malloc that improves performance of multithreaded applications on multicore systems.

Visit WebsiteGitHubGitHub
1.2k stars134 forks0 contributors

What is Hoard?

Hoard is a memory allocator that serves as a drop-in replacement for system malloc, designed to improve the performance of multithreaded applications running on multiprocessor and multicore systems. It solves problems like heap contention, false sharing, and memory blowup that plague standard allocators in concurrent environments. The allocator works across Linux, Windows, and macOS without requiring any changes to application source code.

Target Audience

Developers building performance-critical multithreaded applications in C or C++ that run on multicore systems, particularly those experiencing scalability bottlenecks due to memory allocation. It's also valuable for system programmers and engineers working on servers, telephony systems, computational toolkits, and other allocation-intensive software.

Value Proposition

Developers choose Hoard because it provides provable performance and memory guarantees while being completely transparent to existing code. Unlike standard allocators, it eliminates scalability bottlenecks, prevents false sharing, and bounds memory consumption—all through simple linking or environment variable configuration.

Overview

The Hoard Memory Allocator: A Fast, Scalable, and Memory-efficient Malloc for Linux, Windows, and Mac.

Use Cases

Best For

  • Improving scalability of multithreaded C++ applications using the Standard Template Library (STL)
  • Eliminating heap contention bottlenecks in server applications running on multicore processors
  • Preventing false sharing in concurrent programs where threads access adjacent memory locations
  • Bounding memory consumption in allocation-intensive parallel applications
  • Replacing system malloc in telephony servers, computational fluid dynamics toolkits, and web proxies
  • Running benchmarks and performance tests where memory allocator overhead affects results

Not Ideal For

  • Single-threaded applications running on single-core processors, as Hoard's optimizations are targeted at concurrency
  • Windows programs compiled with the /MT (static C runtime) flag, since Hoard cannot intercept allocations in such executables
  • Projects with extremely low memory allocation frequency where the overhead of a specialized allocator might not justify the benefits
  • Environments requiring deterministic, real-time allocation behavior, as Hoard focuses on scalability rather than predictability

Pros & Cons

Pros

Drop-in Compatibility

Requires no source code changes; works by linking or setting environment variables like LD_PRELOAD on Linux, making it easy to integrate with existing applications.

Multiprocessor Scalability

Eliminates heap contention that serializes threads, allowing programs to scale with CPU count, as evidenced by use in servers from companies like Cisco and SAP.

False Sharing Prevention

Designed to prevent threads on different CPUs from accessing memory in the same cache line, avoiding performance degradation that can be hundreds of times slower.

Provable Memory Bounds

Guarantees bounded memory consumption, preventing blowup where memory needs scale with processor count, a key advantage over standard allocators.

Cons

Windows Static Runtime Incompatibility

Only works with programs compiled using /MD (dynamic C runtime) on Windows; /MT-compiled executables cannot be intercepted, limiting compatibility for some projects.

Setup Complexity on Windows

Requires using tools like withdll.exe or setdll.exe for injection, which adds extra steps and potential confusion compared to simpler Unix-like linking.

Overhead for Single-threaded Use

Optimized for multithreading, so it may introduce unnecessary overhead in single-threaded applications, potentially reducing performance in non-concurrent scenarios.

Frequently Asked Questions

Quick Stats

Stars1,228
Forks134
Contributors0
Open Issues1
Last commit1 month ago
CreatedSince 2012

Tags

#malloc-replacement#memory-allocation#performance-optimization#memory-allocator#malloc#c-plus-plus#multithreading#linux#cross-platform#macos#system-programming#windows

Built With

C
CMake
C
C++

Links & Resources

Website

Included in

C/C++70.6k
Auto-fetched 2 hours ago

Related Projects

mimallocmimalloc

mimalloc is a compact general purpose allocator with excellent performance.

Stars12,753
Forks1,086
Last commit6 hours ago
TCMallocTCMalloc

TCMalloc is Google's customized implementation of C's `malloc()` and C++'s `operator new` for memory allocation within C and C++ code. It provides a high-performance alternative to standard memory allocators, optimized for multi-threaded applications where allocation speed and scalability are critical. ## Key Features - **Fast Allocation** — Optimized for speed with efficient memory management algorithms - **Multi-threaded Performance** — Designed to scale well in concurrent environments - **Customizable Configuration** — Tunable parameters for different workload requirements - **Comprehensive API** — Full support for C and C++ memory allocation interfaces - **Platform Support** — Available across multiple operating systems and architectures ## Philosophy TCMalloc prioritizes performance and scalability in multi-threaded environments while maintaining compatibility with standard memory allocation interfaces, making it suitable for production systems with demanding memory allocation patterns.

Stars5,212
Forks551
Last commit7 hours ago
Boehm GCBoehm GC

The Boehm-Demers-Weiser conservative C/C++ Garbage Collector (bdwgc, also known as bdw-gc, boehm-gc, libgc)

Stars3,454
Forks434
Last commit16 hours ago
rpmallocrpmalloc

Public domain cross platform lock free thread caching 16-byte aligned memory allocator implemented in C

Stars2,435
Forks206
Last commit18 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub