All Projects β†’ emeryberger β†’ Hoard

emeryberger / Hoard

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

Projects that are alternatives of or similar to Hoard

Rpmalloc Rs
🐏 rpmalloc global memory allocator for Rust πŸ¦€
Stars: ✭ 73 (-90.37%)
Mutual labels:  memory-allocation
GC
A lightweight conservative garbage collector for C/C++
Stars: ✭ 108 (-85.75%)
Mutual labels:  memory-allocation
Larray
Large off-heap arrays and mmap files for Scala and Java
Stars: ✭ 370 (-51.19%)
Mutual labels:  memory-allocation
Heapinspector For Ios
Find memory issues & leaks in your iOS app without instruments
Stars: ✭ 1,819 (+139.97%)
Mutual labels:  memory-allocation
mulle-allocator
πŸ”„ Flexible C memory allocation scheme
Stars: ✭ 77 (-89.84%)
Mutual labels:  memory-allocation
smalloc
SMalloc -- a *static* memory allocator.
Stars: ✭ 22 (-97.1%)
Mutual labels:  memory-allocation
Memstrack
A memory allocation tracer combined with stack trace.
Stars: ✭ 60 (-92.08%)
Mutual labels:  memory-allocation
Hardened malloc
Hardened allocator designed for modern systems. It has integration into Android's Bionic libc and can be used externally with musl and glibc as a dynamic library for use on other Linux-based platforms. It will gain more portability / integration over time.
Stars: ✭ 472 (-37.73%)
Mutual labels:  memory-allocation
bbai-lib
C++ library for getting the most out of polymorphic allocators
Stars: ✭ 41 (-94.59%)
Mutual labels:  memory-allocation
Heap Layers
Heap Layers: An Extensible Memory Allocation Infrastructure
Stars: ✭ 260 (-65.7%)
Mutual labels:  memory-allocation
Rmm
RAPIDS Memory Manager
Stars: ✭ 154 (-79.68%)
Mutual labels:  memory-allocation
buddy alloc
A single header buddy memory allocator for C
Stars: ✭ 46 (-93.93%)
Mutual labels:  memory-allocation
zee alloc
tiny Zig allocator primarily targeting WebAssembly
Stars: ✭ 58 (-92.35%)
Mutual labels:  memory-allocation
Libmemory
Embedded systems memory management library. Implementations for malloc(), free(), and other useful memory management functions
Stars: ✭ 102 (-86.54%)
Mutual labels:  memory-allocation
Scalene
Scalene: a high-performance, high-precision CPU, GPU, and memory profiler for Python
Stars: ✭ 4,819 (+535.75%)
Mutual labels:  memory-allocation
Small
Specialized memory allocators
Stars: ✭ 71 (-90.63%)
Mutual labels:  memory-allocation
DLL-INJECTOR
I created a dll injector I am going to Open source its Code. But remember one thing that is any one can use it only for Educational purpose .I again say do not use it to damage anyone's Computer.But one thing if you are using it for some good purpose like to help someone who really need help then I permit you to use it.
Stars: ✭ 14 (-98.15%)
Mutual labels:  memory-allocation
Php Memory Profiler
Memory leak profiler for PHP
Stars: ✭ 544 (-28.23%)
Mutual labels:  memory-allocation
Jvm
πŸ€— JVM εΊ•ε±‚εŽŸη†ζœ€ε…¨ηŸ₯θ―†ζ€»η»“
Stars: ✭ 7,756 (+923.22%)
Mutual labels:  memory-allocation
MemoryAllocator.KanameShiki
Fast multi-threaded memory allocator
Stars: ✭ 73 (-90.37%)
Mutual labels:  memory-allocation

The Hoard Memory Allocator

Copyright (C) 1998-2020 by Emery Berger

The Hoard memory allocator is a fast, scalable, and memory-efficient memory allocator that works on a range of platforms, including Linux, Mac OS X, and Windows.

Hoard is a drop-in replacement for malloc that can dramatically improve application performance, especially for multithreaded programs running on multiprocessors and multicore CPUs. No source code changes necessary: just link it in or set one environment variable (see Building Hoard, below).

Press

Users

Companies using Hoard in their products and servers include AOL, British Telecom, Blue Vector, Business Objects (formerly Crystal Decisions), Cisco, Credit Suisse, Entrust, InfoVista, Kamakura, Novell, Oktal SE, OpenText, OpenWave Systems (for their Typhoon and Twister servers), Pervasive Software, Plath GmbH, Quest Software, Reuters, Royal Bank of Canada, SAP, Sonus Networks, Tata Communications, and Verite Group.

Open source projects using Hoard include the Asterisk Open Source Telephony Project, Bayonne GNU telephony server, the Cilk parallel programming language, the GNU Common C++ system, the OpenFOAM computational fluid dynamics toolkit, and the SafeSquid web proxy.

Hoard is now a standard compiler option for the Standard Performance Evaluation Corporation's CPU2006 benchmark suite for the Intel and Open64 compilers.

Licensing

Hoard has now been released under the widely-used and permissive Apache license, version 2.0.

Why Hoard?

There are a number of problems with existing memory allocators that make Hoard a better choice.

Contention

Multithreaded programs often do not scale because the heap is a bottleneck. When multiple threads simultaneously allocate or deallocate memory from the allocator, the allocator will serialize them. Programs making intensive use of the allocator actually slow down as the number of processors increases. Your program may be allocation-intensive without you realizing it, for instance, if your program makes many calls to the C++ Standard Template Library (STL). Hoard eliminates this bottleneck.

False Sharing

System-provided memory allocators can cause insidious problems for multithreaded code. They can lead to a phenomenon known as "false sharing": threads on different CPUs can end up with memory in the same cache line, or chunk of memory. Accessing these falsely-shared cache lines is hundreds of times slower than accessing unshared cache lines. Hoard is designed to prevent false sharing.

Blowup

Multithreaded programs can also lead the allocator to blowup memory consumption. This effect can multiply the amount of memory needed to run your application by the number of CPUs on your machine: four CPUs could mean that you need four times as much memory. Hoard is guaranteed (provably!) to bound memory consumption.

Installation

Homebrew (Mac OS X)

You can use Homebrew to install the current version of Hoard as follows:

brew tap emeryberger/hoard
brew install --HEAD emeryberger/hoard/libhoard

This not only installs the Hoard library, but also creates a hoard command you can use to run Hoard with anything at the command-line.

hoard myprogram-goes-here

Building Hoard from source (Mac OS X, Linux, and Windows WSL2)

To build Hoard from source, do the following:

git clone https://github.com/emeryberger/Hoard
cd src
make

You can then use Hoard by linking it with your executable, or by setting the LD_PRELOAD environment variable, as in

export LD_PRELOAD=/path/to/libhoard.so

or, in Mac OS X:

export DYLD_INSERT_LIBRARIES=/path/to/libhoard.dylib

Building Hoard (Windows)

Change into the src directory and build the Windows version:

C:\hoard\src> nmake

To use Hoard, link your executable with source\uselibhoard.cpp and libhoard.lib. You must use the /MD flag.

Example:

C:\hoard\src> cl /Ox /MD yourapp.cpp source\uselibhoard.cpp libhoard.lib

To run yourapp.exe, you will need to have libhoard.dll in your path.

Benchmarks

The directory benchmarks/ contains a number of benchmarks used to evaluate and tune Hoard.

Technical Information

Hoard has changed quite a bit over the years, but for technical details of the first version of Hoard, read Hoard: A Scalable Memory Allocator for Multithreaded Applications, by Emery D. Berger, Kathryn S. McKinley, Robert D. Blumofe, and Paul R. Wilson. The Ninth International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS-IX). Cambridge, MA, November 2000.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].