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

Overview

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.

Comments
  • Issues replacing malloc() on Windows

    Issues replacing malloc() on Windows

    I'm evaluating the possibility to replace malloc() for LLVM. I hit some problems I'd like to point out here: The README is wrong:

    c:\Users\fluttershy\work\Hoard\src>nmake windows
    
    Microsoft (R) Program Maintenance Utility Version 14.00.23918.0
    Copyright (C) Microsoft Corporation.  All rights reserved.
    
    NMAKE : fatal error U1073: don't know how to make 'windows'
    Stop.
    

    The correct command seems to be just nmake:

    c:\Users\fluttershy\work\Hoard\src>nmake
    
    Microsoft (R) Program Maintenance Utility Version 14.00.23918.0
    Copyright (C) Microsoft Corporation.  All rights reserved.
    
    *****
    This Makefile is for Windows only. For other systems, use gmake.
    *****
            cl /I. /Iinclude /Iinclude/util /Iinclude/hoard /Iinclude/superblocks /I
    Heap-Layers /D "NDEBUG" /D "_WINDOWS" /D "_WINDLL" /D "_WINRT_DLL" /D "_UNICODE"
     /D "UNICODE" /Zi /Ox /MD /nologo /W1 /WX- /Ox /Oi /Oy- /Gm- /EHsc /MD /GS /Gy /
    Zc:wchar_t /Zc:forScope /Gd /errorReport:queue "source\libhoard.cpp" "Heap-Layer
    s\wrappers\winwrapper.cpp" "source\wintls.cpp" /GL /link /DLL /subsystem:console
     /OUT:libhoard.dll
    libhoard.cpp
    winwrapper.cpp
    wintls.cpp
       Creating library libhoard.lib and object libhoard.exp
    Generating code
    Finished generating code
            cl /I. /Iinclude /Iinclude/util /Iinclude/hoard /Iinclude/superblocks /I
    Heap-Layers /D "NDEBUG" /D "_WINDOWS" /D "_WINDLL" /D "_WINRT_DLL" /D "_UNICODE"
     /D "UNICODE" /Zi /Ox /MD /nologo /W1 /WX- /Ox /Oi /Oy- /Gm- /EHsc /MD /GS /Gy /
    Zc:wchar_t /Zc:forScope /Gd /errorReport:queue /c "source\uselibhoard.cpp"
    uselibhoard.cpp
    

    The malloc() replacement example doesn't quite work, in basic cases:

    $ cat patatino.cpp
    #include <stdlib.h>
    
    int main (void) {
            malloc(16);
            return (0);
    }
    

    If I try to run the way it's described on the website:

    c:\Users\fluttershy\work\Hoard\src>cl /Ox /MD patatino.cpp source\libhoard.cpp libhoard.lib
    Microsoft (R) C/C++ Optimizing Compiler Version 19.00.23918 for x64
    Copyright (C) Microsoft Corporation.  All rights reserved.
    
    patatino.cpp
    libhoard.cpp
    source\libhoard.cpp(33): fatal error C1083: Cannot open include file: 'heaplayer
    s.h': No such file or directory
    Generating Code...
    

    It seems the issue is that it's not able to locate the headers, something like this might fix:

    diff --git a/src/source/libhoard.cpp b/src/source/libhoard.cpp
    index 54d3713..cb39efc 100644
    --- a/src/source/libhoard.cpp
    +++ b/src/source/libhoard.cpp
    @@ -30,7 +30,7 @@
      * @author Emery Berger <http://www.cs.umass.edu/~emery>
      */
    
    -#include "heaplayers.h"
    +#include "../Heap-Layers/heaplayers.h"
     using namespace HL;
    
     #include <new>
    

    But immediately after I hit another problem:

    c:\users\fluttershy\work\hoard\src\heap-layers\heaps\combining\hybridheap.h(32):
     fatal error C1083: Cannot open include file: 'heaplayers.h': No such file or di
    rectory
    

    Any ideas on how to fix? I think the instructions on the website need some love.

    opened by dcci 7
  • compilation fails for linux-gcc-x86 or -64

    compilation fails for linux-gcc-x86 or -64

    Heap-Layers/utility/align.h:17:49: warning: unused variable ‘isPowerOfTwo’ [-Wunused-variable] Heap-Layers/utility/align.h: In instantiation of ‘size_t HL::align(size_t) [with long unsigned int Alignment = 65536ul; size_t = long unsigned int]’: include/util/alignedmmap.h:83:7: required from ‘void* Hoard::AlignedMmapInstance<Alignment_>::malloc(size_t) [with long unsigned int Alignment_ = 65536ul; size_t = long unsigned int]’ Heap-Layers/heaps/threads/lockedheap.h:42:31: required from ‘void* HL::LockedHeap<LockType, Super>::malloc(size_t) [with LockType = HL::SpinLockType; Super = Hoard::AlignedMmapInstance<65536ul>; size_t = long unsigned int]’ include/util/exactlyoneheap.h:42:34: required from ‘void* Hoard::ExactlyOneHeap::malloc(size_t) [with Heap = HL::LockedHeap<HL::SpinLockType, Hoard::AlignedMmapInstance<65536ul> >; size_t = long unsigned int]’ include/superblocks/alignedsuperblockheap.h:54:70: required from ‘void* Hoard::SuperblockStore<SuperblockSize, TheLockType, MmapSource>::malloc(size_t) [with long unsigned int SuperblockSize = 65536ul; TheLockType = HL::SpinLockType; MmapSource = Hoard::MmapSource; size_t = long unsigned int]’ include/util/fixedrequestheap.h:43:44: required from ‘void* Hoard::FixedRequestHeap<RequestSize, SuperHeap>::malloc(size_t) [with long unsigned int RequestSize = 65536ul; SuperHeap = Hoard::SuperblockStore<65536ul, HL::SpinLockType, Hoard::MmapSource>; size_t = long unsigned int]’ Heap-Layers/heaps/threads/lockedheap.h:42:31: required from ‘void* HL::LockedHeap<LockType, Super>::malloc(size_t) [with LockType = HL::SpinLockType; Super = Hoard::FixedRequestHeap<65536ul, Hoard::SuperblockStore<65536ul, HL::SpinLockType, Hoard::MmapSource> >; size_t = long unsigned int]’ include/hoard/hoardmanager.h:354:49: required from ‘void* Hoard::HoardManager<SourceHeap, ParentHeap, SuperblockType_, EmptinessClasses, LockType, thresholdFunctionClass, HeapType>::getAnotherSuperblock(size_t) [with SourceHeap = Hoard::AlignedSuperblockHeap<HL::SpinLockType, 65536ul, Hoard::MmapSource>; ParentHeap = Hoard::GlobalHeap<65536ul, 8, Hoard::MmapSource, HL::SpinLockType>; SuperblockType_ = Hoard::HoardSuperblock<HL::SpinLockType, 65536, Hoard::SmallHeap>; int EmptinessClasses = 8; LockType = HL::SpinLockType; thresholdFunctionClass = Hoard::hoardThresholdFunctionClass; HeapType = Hoard::SmallHeap; size_t = long unsigned int]’ include/hoard/hoardmanager.h:298:4: required from ‘void* Hoard::HoardManager<SourceHeap, ParentHeap, SuperblockType_, EmptinessClasses, LockType, thresholdFunctionClass, HeapType>::slowPathMalloc(size_t) [with SourceHeap = Hoard::AlignedSuperblockHeap<HL::SpinLockType, 65536ul, Hoard::MmapSource>; ParentHeap = Hoard::GlobalHeap<65536ul, 8, Hoard::MmapSource, HL::SpinLockType>; SuperblockType_ = Hoard::HoardSuperblock<HL::SpinLockType, 65536, Hoard::SmallHeap>; int EmptinessClasses = 8; LockType = HL::SpinLockType; thresholdFunctionClass = Hoard::hoardThresholdFunctionClass; HeapType = Hoard::SmallHeap; size_t = long unsigned int]’ include/hoard/hoardmanager.h:93:2: required from ‘void* Hoard::HoardManager<SourceHeap, ParentHeap, SuperblockType_, EmptinessClasses, LockType, thresholdFunctionClass, HeapType>::malloc(size_t) [with SourceHeap = Hoard::AlignedSuperblockHeap<HL::SpinLockType, 65536ul, Hoard::MmapSource>; ParentHeap = Hoard::GlobalHeap<65536ul, 8, Hoard::MmapSource, HL::SpinLockType>; SuperblockType_ = Hoard::HoardSuperblock<HL::SpinLockType, 65536, Hoard::SmallHeap>; int EmptinessClasses = 8; LockType = HL::SpinLockType; thresholdFunctionClass = Hoard::hoardThresholdFunctionClass; HeapType = Hoard::SmallHeap; size_t = long unsigned int]’ include/hoard/hoardheap.h:171:31: required from here Heap-Layers/utility/align.h:17:49: warning: unused variable ‘isPowerOfTwo’ [-Wunused-variable] In file included from Heap-Layers/heaps/top/mmapheap.h:49:0, from Heap-Layers/heaps/debug/sanitycheckheap.h:18, from Heap-Layers/heaps/debug/all.h:4, from Heap-Layers/heaps/all.h:2, from Heap-Layers/heaplayers.h:105, from include/hoard/hoardheap.h:31, from include/hoard/hoardtlab.h:39, from source/unixtls.cpp:56: Heap-Layers/utility/myhashmap.h: In instantiation of ‘Value HL::MyHashMap<Key, Value, Allocator>::get(Key) [with Key = void_; Value = long unsigned int; Allocator = Hoard::AlignedMmapInstance<65536ul>::SourceHeap]’: include/util/alignedmmap.h:127:44: required from ‘void Hoard::AlignedMmapInstance<Alignment_>::free(void_) [with long unsigned int Alignment_ = 65536ul]’ Heap-Layers/heaps/threads/lockedheap.h:47:7: required from ‘void HL::LockedHeap<LockType, Super>::free(void_) [with LockType = HL::SpinLockType; Super = Hoard::AlignedMmapInstance<65536ul>]’ include/util/exactlyoneheap.h:45:7: required from ‘void Hoard::ExactlyOneHeap::free(void_) [with Heap = HL::LockedHeap<HL::SpinLockType, Hoard::AlignedMmapInstance<65536ul> >]’ include/superblocks/addheaderheap.h:85:7: required from ‘void Hoard::AddHeaderHeap<SuperblockType, SuperblockSize, SuperHeap>::free(void_) [with SuperblockType = Hoard::HoardSuperblock<HL::SpinLockType, 65536, Hoard::BigHeap>; long unsigned int SuperblockSize = 65536ul; SuperHeap = Hoard::MmapSource]’ Heap-Layers/heaps/threads/lockedheap.h:47:7: required from ‘void HL::LockedHeap<LockType, Super>::free(void_) [with LockType = HL::SpinLockType; Super = Hoard::AddHeaderHeap<Hoard::HoardSuperblock<HL::SpinLockType, 65536, Hoard::BigHeap>, 65536ul, Hoard::MmapSource>]’ Heap-Layers/heaps/combining/hybridheap.h:69:2: required from ‘void HL::HybridHeap<BigSize, SmallHeap, BigHeap>::free(void_) [with int BigSize = 8192; SmallHeap = Hoard::ThreadPoolHeap<2048, 128, Hoard::PerThreadHoardHeap>; BigHeap = Hoard::BigHeap]’ include/superblocks/ignoreinvalidfree.h:49:2: required from ‘void Hoard::IgnoreInvalidFree::free(void_) [with SuperHeap = HL::HybridHeap<8192, Hoard::ThreadPoolHeap<2048, 128, Hoard::PerThreadHoardHeap>, Hoard::BigHeap>]’ Heap-Layers/wrappers/ansiwrapper.h:54:8: required from ‘void HL::ANSIWrapper::free(void_) [with SuperHeap = Hoard::IgnoreInvalidFree<HL::HybridHeap<8192, Hoard::ThreadPoolHeap<2048, 128, Hoard::PerThreadHoardHeap>, Hoard::BigHeap> >]’ include/superblocks/tlab.h:145:4: required from ‘void Hoard::ThreadLocalAllocationBuffer<NumBins, getSizeClass, getClassSize, LargestObject, LocalHeapThreshold, SuperblockType, SuperblockSize, ParentHeap>::clear() [with int NumBins = 11; unsigned int (_ getSizeClass)(size_t) = HL::bins<Header, 65536>::getSizeClass<Hoard::HoardSuperblockHeader<HL::SpinLockType, 65536, Hoard::SmallHeap> >; size_t (* getClassSize)(unsigned int) = HL::bins<Header, 65536>::getClassSize<Hoard::HoardSuperblockHeader<HL::SpinLockType, 65536, Hoard::SmallHeap> >; unsigned int LargestObject = 256u; unsigned int LocalHeapThreshold = 262144u; SuperblockType = Hoard::HoardSuperblock<HL::SpinLockType, 65536, Hoard::SmallHeap>; unsigned int SuperblockSize = 65536u; ParentHeap = Hoard::HoardHeapType]’ source/unixtls.cpp:172:15: required from here Heap-Layers/utility/myhashmap.h:68:67: warning: conversion to ‘unsigned int’ from ‘long unsigned int’ may alter its value [-Wconversion] Heap-Layers/utility/myhashmap.h: In instantiation of ‘void HL::MyHashMap<Key, Value, Allocator>::erase(Key) [with Key = void_; Value = long unsigned int; Allocator = Hoard::AlignedMmapInstance<65536ul>::SourceHeap]’: include/util/alignedmmap.h:136:7: required from ‘void Hoard::AlignedMmapInstance<Alignment_>::free(void_) [with long unsigned int Alignment_ = 65536ul]’ Heap-Layers/heaps/threads/lockedheap.h:47:7: required from ‘void HL::LockedHeap<LockType, Super>::free(void_) [with LockType = HL::SpinLockType; Super = Hoard::AlignedMmapInstance<65536ul>]’ include/util/exactlyoneheap.h:45:7: required from ‘void Hoard::ExactlyOneHeap::free(void_) [with Heap = HL::LockedHeap<HL::SpinLockType, Hoard::AlignedMmapInstance<65536ul> >]’ include/superblocks/addheaderheap.h:85:7: required from ‘void Hoard::AddHeaderHeap<SuperblockType, SuperblockSize, SuperHeap>::free(void_) [with SuperblockType = Hoard::HoardSuperblock<HL::SpinLockType, 65536, Hoard::BigHeap>; long unsigned int SuperblockSize = 65536ul; SuperHeap = Hoard::MmapSource]’ Heap-Layers/heaps/threads/lockedheap.h:47:7: required from ‘void HL::LockedHeap<LockType, Super>::free(void_) [with LockType = HL::SpinLockType; Super = Hoard::AddHeaderHeap<Hoard::HoardSuperblock<HL::SpinLockType, 65536, Hoard::BigHeap>, 65536ul, Hoard::MmapSource>]’ Heap-Layers/heaps/combining/hybridheap.h:69:2: required from ‘void HL::HybridHeap<BigSize, SmallHeap, BigHeap>::free(void_) [with int BigSize = 8192; SmallHeap = Hoard::ThreadPoolHeap<2048, 128, Hoard::PerThreadHoardHeap>; BigHeap = Hoard::BigHeap]’ include/superblocks/ignoreinvalidfree.h:49:2: required from ‘void Hoard::IgnoreInvalidFree::free(void_) [with SuperHeap = HL::HybridHeap<8192, Hoard::ThreadPoolHeap<2048, 128, Hoard::PerThreadHoardHeap>, Hoard::BigHeap>]’ Heap-Layers/wrappers/ansiwrapper.h:54:8: required from ‘void HL::ANSIWrapper::free(void_) [with SuperHeap = Hoard::IgnoreInvalidFree<HL::HybridHeap<8192, Hoard::ThreadPoolHeap<2048, 128, Hoard::PerThreadHoardHeap>, Hoard::BigHeap> >]’ include/superblocks/tlab.h:145:4: required from ‘void Hoard::ThreadLocalAllocationBuffer<NumBins, getSizeClass, getClassSize, LargestObject, LocalHeapThreshold, SuperblockType, SuperblockSize, ParentHeap>::clear() [with int NumBins = 11; unsigned int (_ getSizeClass)(size_t) = HL::bins<Header, 65536>::getSizeClass<Hoard::HoardSuperblockHeader<HL::SpinLockType, 65536, Hoard::SmallHeap> >; size_t (* getClassSize)(unsigned int) = HL::bins<Header, 65536>::getClassSize<Hoard::HoardSuperblockHeader<HL::SpinLockType, 65536, Hoard::SmallHeap> >; unsigned int LargestObject = 256u; unsigned int LocalHeapThreshold = 262144u; SuperblockType = Hoard::HoardSuperblock<HL::SpinLockType, 65536, Hoard::SmallHeap>; unsigned int SuperblockSize = 65536u; ParentHeap = Hoard::HoardHeapType]’ source/unixtls.cpp:172:15: required from here Heap-Layers/utility/myhashmap.h:81:67: warning: conversion to ‘unsigned int’ from ‘long unsigned int’ may alter its value [-Wconversion] Heap-Layers/utility/myhashmap.h: In instantiation of ‘void HL::MyHashMap<Key, Value, Allocator>::insert(Key, Value) [with Key = void_; Value = long unsigned int; Allocator = Hoard::AlignedMmapInstance<65536ul>::SourceHeap]’: Heap-Layers/utility/myhashmap.h:64:7: required from ‘void HL::MyHashMap<Key, Value, Allocator>::set(Key, Value) [with Key = void_; Value = long unsigned int; Allocator = Hoard::AlignedMmapInstance<65536ul>::SourceHeap]’ include/util/alignedmmap.h:73:2: required from ‘void* Hoard::AlignedMmapInstance<Alignment_>::malloc(size_t) [with long unsigned int Alignment_ = 65536ul; size_t = long unsigned int]’ Heap-Layers/heaps/threads/lockedheap.h:42:31: required from ‘void* HL::LockedHeap<LockType, Super>::malloc(size_t) [with LockType = HL::SpinLockType; Super = Hoard::AlignedMmapInstance<65536ul>; size_t = long unsigned int]’ include/util/exactlyoneheap.h:42:34: required from ‘void* Hoard::ExactlyOneHeap::malloc(size_t) [with Heap = HL::LockedHeap<HL::SpinLockType, Hoard::AlignedMmapInstance<65536ul> >; size_t = long unsigned int]’ include/superblocks/alignedsuperblockheap.h:54:70: required from ‘void* Hoard::SuperblockStore<SuperblockSize, TheLockType, MmapSource>::malloc(size_t) [with long unsigned int SuperblockSize = 65536ul; TheLockType = HL::SpinLockType; MmapSource = Hoard::MmapSource; size_t = long unsigned int]’ include/util/fixedrequestheap.h:43:44: required from ‘void* Hoard::FixedRequestHeap<RequestSize, SuperHeap>::malloc(size_t) [with long unsigned int RequestSize = 65536ul; SuperHeap = Hoard::SuperblockStore<65536ul, HL::SpinLockType, Hoard::MmapSource>; size_t = long unsigned int]’ Heap-Layers/heaps/threads/lockedheap.h:42:31: required from ‘void* HL::LockedHeap<LockType, Super>::malloc(size_t) [with LockType = HL::SpinLockType; Super = Hoard::FixedRequestHeap<65536ul, Hoard::SuperblockStore<65536ul, HL::SpinLockType, Hoard::MmapSource> >; size_t = long unsigned int]’ include/hoard/hoardmanager.h:354:49: required from ‘void* Hoard::HoardManager<SourceHeap, ParentHeap, SuperblockType_, EmptinessClasses, LockType, thresholdFunctionClass, HeapType>::getAnotherSuperblock(size_t) [with SourceHeap = Hoard::AlignedSuperblockHeap<HL::SpinLockType, 65536ul, Hoard::MmapSource>; ParentHeap = Hoard::GlobalHeap<65536ul, 8, Hoard::MmapSource, HL::SpinLockType>; SuperblockType_ = Hoard::HoardSuperblock<HL::SpinLockType, 65536, Hoard::SmallHeap>; int EmptinessClasses = 8; LockType = HL::SpinLockType; thresholdFunctionClass = Hoard::hoardThresholdFunctionClass; HeapType = Hoard::SmallHeap; size_t = long unsigned int]’ include/hoard/hoardmanager.h:298:4: required from ‘void* Hoard::HoardManager<SourceHeap, ParentHeap, SuperblockType_, EmptinessClasses, LockType, thresholdFunctionClass, HeapType>::slowPathMalloc(size_t) [with SourceHeap = Hoard::AlignedSuperblockHeap<HL::SpinLockType, 65536ul, Hoard::MmapSource>; ParentHeap = Hoard::GlobalHeap<65536ul, 8, Hoard::MmapSource, HL::SpinLockType>; SuperblockType_ = Hoard::HoardSuperblock<HL::SpinLockType, 65536, Hoard::SmallHeap>; int EmptinessClasses = 8; LockType = HL::SpinLockType; thresholdFunctionClass = Hoard::hoardThresholdFunctionClass; HeapType = Hoard::SmallHeap; size_t = long unsigned int]’ include/hoard/hoardmanager.h:93:2: required from ‘void* Hoard::HoardManager<SourceHeap, ParentHeap, SuperblockType_, EmptinessClasses, LockType, thresholdFunctionClass, HeapType>::malloc(size_t) [with SourceHeap = Hoard::AlignedSuperblockHeap<HL::SpinLockType, 65536ul, Hoard::MmapSource>; ParentHeap = Hoard::GlobalHeap<65536ul, 8, Hoard::MmapSource, HL::SpinLockType>; SuperblockType_ = Hoard::HoardSuperblock<HL::SpinLockType, 65536, Hoard::SmallHeap>; int EmptinessClasses = 8; LockType = HL::SpinLockType; thresholdFunctionClass = Hoard::hoardThresholdFunctionClass; HeapType = Hoard::SmallHeap; size_t = long unsigned int]’ include/hoard/hoardheap.h:171:31: required from here Heap-Layers/utility/myhashmap.h:107:67: warning: conversion to ‘unsigned int’ from ‘long unsigned int’ may alter its value [-Wconversion] Heap-Layers/wrappers/gnuwrapper.cpp: In function ‘void my_init_hook()’: Heap-Layers/wrappers/gnuwrapper.cpp:79:23: warning: ‘__malloc_hook’ is deprecated (declared at /usr/include/malloc.h:176) [-Wdeprecated-declarations] Heap-Layers/wrappers/gnuwrapper.cpp:80:21: warning: ‘__free_hook’ is deprecated (declared at /usr/include/malloc.h:173) [-Wdeprecated-declarations] Heap-Layers/wrappers/gnuwrapper.cpp:81:24: warning: ‘__realloc_hook’ is deprecated (declared at /usr/include/malloc.h:179) [-Wdeprecated-declarations] Heap-Layers/wrappers/gnuwrapper.cpp:82:25: warning: ‘__memalign_hook’ is deprecated (declared at /usr/include/malloc.h:183) [-Wdeprecated-declarations] Heap-Layers/wrappers/gnuwrapper.cpp:85:5: warning: ‘__malloc_hook’ is deprecated (declared at /usr/include/malloc.h:176) [-Wdeprecated-declarations] Heap-Layers/wrappers/gnuwrapper.cpp:86:5: warning: ‘__free_hook’ is deprecated (declared at /usr/include/malloc.h:173) [-Wdeprecated-declarations] Heap-Layers/wrappers/gnuwrapper.cpp:87:5: warning: ‘__realloc_hook’ is deprecated (declared at /usr/include/malloc.h:179) [-Wdeprecated-declarations] Heap-Layers/wrappers/gnuwrapper.cpp:88:5: warning: ‘__memalign_hook’ is deprecated (declared at /usr/include/malloc.h:183) [-Wdeprecated-declarations] make: *** [linux-gcc-x86-64] Error 1

    opened by mr-c 7
  • can not cross compile in arm

    can not cross compile in arm

    when i cross compilt it, it is error: {standard input}: Assembler messages: {standard input}:1118: Error: misaligned branch destination {standard input}:1128: Error: misaligned branch destination {standard input}:1132: Error: misaligned branch destination {standard input}: Assembler messages: {standard input}:356: Error: misaligned branch destination {standard input}:366: Error: misaligned branch destination {standard input}:370: Error: misaligned branch destination

    any idea?

    opened by van201314 6
  • Compilation fails on Mac OS X 10.8.4

    Compilation fails on Mac OS X 10.8.4

    At commit 7e8647e, "make macos" fails with numerous errors. Some are in Heap-Layers, some not. Transcript below. You may well be aware of all this :)

    I downloaded the 3.9 tarball and it built (with many warnings). It would be nice if there were Git tags for the releases, assuming you have the history in Git.

    Thanks!

    $ uname -a
    Darwin silverbird.local 12.4.0 Darwin Kernel Version 12.4.0: Wed May  1 17:57:12 PDT 2013; root:xnu-2050.24.15~1/RELEASE_X86_64 x86_64
    $ clang --version
    Apple clang version 4.0 (tags/Apple/clang-421.0.60) (based on LLVM 3.1svn)
    Target: x86_64-apple-darwin12.4.0
    Thread model: posix
    $ git clone --recursive git://github.com/emeryberger/Hoard.git
    $ cd Hoard/src
    $ make macos
    clang++ -arch i386 -arch x86_64 -pipe -g -O3 -Wall -DNDEBUG -I. -Iinclude -Iinclude/util -Iinclude/hoard -Iinclude/superblocks -IHeap-Layers -D_REENTRANT=1 -compatibility_version 1 -current_version 1 -dynamiclib -D'CUSTOM_PREFIX(x)=xx##x' source/libhoard.cpp Heap-Layers/wrappers/macwrapper.cpp source/mactls.cpp -o libhoard.dylib -ldl -lpthread 
    In file included from source/libhoard.cpp:33:
    In file included from Heap-Layers/heaplayers.h:103:
    In file included from Heap-Layers/heaps/all.h:1:
    In file included from Heap-Layers/heaps/buildingblock/all.h:1:
    Heap-Layers/heaps/buildingblock/adaptheap.h:51:9: error: use of undeclared
          identifier 'assert'
            assert (SuperHeap::getSize(ptr) >= sizeof(dict));
            ^
    Heap-Layers/heaps/combining/strictsegheap.h:102:50: note: in instantiation of
          member function 'HL::AdaptHeap<HL::DLList,
          Hoard::AddHeaderHeap<Hoard::HoardSuperblock<HL::MacLockType, 65536,
          Hoard::BigHeap>, 65536, Hoard::MmapSource> >::malloc' requested here
            ptr = SuperHeap::myLittleHeap[sizeClass].malloc (realSize);
                                                     ^
    include/hoard/thresholdsegheap.h:42:31: note: in instantiation of member
          function 'HL::StrictSegHeap<80, size2class, class2size,
          HL::AdaptHeap<HL::DLList,
          Hoard::AddHeaderHeap<Hoard::HoardSuperblock<HL::MacLockType, 65536,
          Hoard::BigHeap>, 65536, Hoard::MmapSource>>,
          Hoard::AddHeaderHeap<Hoard::HoardSuperblock<HL::MacLockType, 65536,
          Hoard::BigHeap>, 65536, Hoard::MmapSource> >::malloc' requested here
          void * ptr = SuperHeap::malloc (sz);
                                  ^
    Heap-Layers/heaps/threads/lockedheap.h:43:21: note: in instantiation of member
          function 'Hoard::ThresholdSegHeap<20, 65536, 80, size2class, class2size,
          HL::AdaptHeap<HL::DLList,
          Hoard::AddHeaderHeap<Hoard::HoardSuperblock<HL::MacLockType, 65536,
          Hoard::BigHeap>, 65536, Hoard::MmapSource>>,
          Hoard::AddHeaderHeap<Hoard::HoardSuperblock<HL::MacLockType, 65536,
          Hoard::BigHeap>, 65536, Hoard::MmapSource> >::malloc' requested here
          return Super::malloc (sz);
                        ^
    Heap-Layers/heaps/threads/threadheap.h:66:28: note: in instantiation of member
          function 'HL::LockedHeap<HL::MacLockType, Hoard::ThresholdSegHeap<20,
          65536, 80, size2class, class2size, HL::AdaptHeap<HL::DLList,
          Hoard::AddHeaderHeap<Hoard::HoardSuperblock<HL::MacLockType, 65536,
          Hoard::BigHeap>, 65536, Hoard::MmapSource>>,
          Hoard::AddHeaderHeap<Hoard::HoardSuperblock<HL::MacLockType, 65536,
          Hoard::BigHeap>, 65536, Hoard::MmapSource>> >::malloc' requested here
          return getHeap(tid)->malloc (sz);
                               ^
    Heap-Layers/heaps/combining/hybridheap.h:82:17: note: in instantiation of member
          function 'HL::ThreadHeap<64, HL::LockedHeap<HL::MacLockType,
          Hoard::ThresholdSegHeap<20, 65536, 80, size2class, class2size,
          HL::AdaptHeap<HL::DLList,
          Hoard::AddHeaderHeap<Hoard::HoardSuperblock<HL::MacLockType, 65536,
          Hoard::BigHeap>, 65536, Hoard::MmapSource>>,
          Hoard::AddHeaderHeap<Hoard::HoardSuperblock<HL::MacLockType, 65536,
          Hoard::BigHeap>, 65536, Hoard::MmapSource>>> >::malloc' requested here
          return bm.malloc (sz);
                    ^
    Heap-Layers/heaps/combining/hybridheap.h:57:15: note: in instantiation of member
          function 'HL::HybridHeap<8192, Hoard::ThreadPoolHeap<2048, 128,
          Hoard::PerThreadHoardHeap>, Hoard::BigHeap>::slowPath' requested here
            ptr = slowPath (sz);
                  ^
    Heap-Layers/wrappers/ansiwrapper.h:52:31: note: in instantiation of member
          function 'HL::HybridHeap<8192, Hoard::ThreadPoolHeap<2048, 128,
          Hoard::PerThreadHoardHeap>, Hoard::BigHeap>::malloc' requested here
          void * ptr = SuperHeap::malloc (sz);
                                  ^
    include/superblocks/tlab.h:102:33: note: in instantiation of member function
          'HL::ANSIWrapper<Hoard::IgnoreInvalidFree<HL::HybridHeap<8192,
          Hoard::ThreadPoolHeap<2048, 128, Hoard::PerThreadHoardHeap>,
          Hoard::BigHeap>> >::malloc' requested here
          void * ptr = _parentHeap->malloc (sz);
                                    ^
    source/libhoard.cpp:116:21: note: in instantiation of member function
          'Hoard::ThreadLocalAllocationBuffer<11, getSizeClass, getClassSize, 256,
          262144, Hoard::HoardSuperblock<HL::MacLockType, 65536, Hoard::SmallHeap>,
          65536, Hoard::HoardHeapType>::malloc' requested here
        void * ptr = h->malloc (sz);
                        ^
    In file included from source/libhoard.cpp:33:
    In file included from Heap-Layers/heaplayers.h:103:
    In file included from Heap-Layers/heaps/all.h:1:
    In file included from Heap-Layers/heaps/buildingblock/all.h:1:
    Heap-Layers/heaps/buildingblock/adaptheap.h:59:9: error: use of undeclared
          identifier 'assert'
            assert (SuperHeap::getSize(ptr) >= sizeof(dict));
            ^
    Heap-Layers/heaps/combining/strictsegheap.h:127:50: note: in instantiation of
          member function 'HL::AdaptHeap<HL::DLList,
          Hoard::AddHeaderHeap<Hoard::HoardSuperblock<HL::MacLockType, 65536,
          Hoard::BigHeap>, 65536, Hoard::MmapSource> >::free' requested here
            SuperHeap::myLittleHeap[objectSizeClass].free (ptr);
                                                     ^
    include/hoard/thresholdsegheap.h:55:18: note: in instantiation of member
          function 'HL::StrictSegHeap<80, size2class, class2size,
          HL::AdaptHeap<HL::DLList,
          Hoard::AddHeaderHeap<Hoard::HoardSuperblock<HL::MacLockType, 65536,
          Hoard::BigHeap>, 65536, Hoard::MmapSource>>,
          Hoard::AddHeaderHeap<Hoard::HoardSuperblock<HL::MacLockType, 65536,
          Hoard::BigHeap>, 65536, Hoard::MmapSource> >::free' requested here
          SuperHeap::free (ptr);
                     ^
    Heap-Layers/heaps/threads/lockedheap.h:48:14: note: in instantiation of member
          function 'Hoard::ThresholdSegHeap<20, 65536, 80, size2class, class2size,
          HL::AdaptHeap<HL::DLList,
          Hoard::AddHeaderHeap<Hoard::HoardSuperblock<HL::MacLockType, 65536,
          Hoard::BigHeap>, 65536, Hoard::MmapSource>>,
          Hoard::AddHeaderHeap<Hoard::HoardSuperblock<HL::MacLockType, 65536,
          Hoard::BigHeap>, 65536, Hoard::MmapSource> >::free' requested here
          Super::free (ptr);
                 ^
    Heap-Layers/heaps/threads/threadheap.h:73:21: note: in instantiation of member
          function 'HL::LockedHeap<HL::MacLockType, Hoard::ThresholdSegHeap<20,
          65536, 80, size2class, class2size, HL::AdaptHeap<HL::DLList,
          Hoard::AddHeaderHeap<Hoard::HoardSuperblock<HL::MacLockType, 65536,
          Hoard::BigHeap>, 65536, Hoard::MmapSource>>,
          Hoard::AddHeaderHeap<Hoard::HoardSuperblock<HL::MacLockType, 65536,
          Hoard::BigHeap>, 65536, Hoard::MmapSource>> >::free' requested here
          getHeap(tid)->free (ptr);
                        ^
    Heap-Layers/heaps/combining/hybridheap.h:68:12: note: in instantiation of member
          function 'HL::ThreadHeap<64, HL::LockedHeap<HL::MacLockType,
          Hoard::ThresholdSegHeap<20, 65536, 80, size2class, class2size,
          HL::AdaptHeap<HL::DLList,
          Hoard::AddHeaderHeap<Hoard::HoardSuperblock<HL::MacLockType, 65536,
          Hoard::BigHeap>, 65536, Hoard::MmapSource>>,
          Hoard::AddHeaderHeap<Hoard::HoardSuperblock<HL::MacLockType, 65536,
          Hoard::BigHeap>, 65536, Hoard::MmapSource>>> >::free' requested here
            bm.free (ptr);
               ^
    include/superblocks/ignoreinvalidfree.h:49:13: note: in instantiation of member
          function 'HL::HybridHeap<8192, Hoard::ThreadPoolHeap<2048, 128,
          Hoard::PerThreadHoardHeap>, Hoard::BigHeap>::free' requested here
            SuperHeap::free (ptr);
                       ^
    Heap-Layers/wrappers/ansiwrapper.h:59:19: note: in instantiation of member
          function 'Hoard::IgnoreInvalidFree<HL::HybridHeap<8192,
          Hoard::ThreadPoolHeap<2048, 128, Hoard::PerThreadHoardHeap>,
          Hoard::BigHeap> >::free' requested here
            SuperHeap::free (ptr);
                       ^
    include/superblocks/tlab.h:132:23: note: in instantiation of member function
          'HL::ANSIWrapper<Hoard::IgnoreInvalidFree<HL::HybridHeap<8192,
          Hoard::ThreadPoolHeap<2048, 128, Hoard::PerThreadHoardHeap>,
          Hoard::BigHeap>> >::free' requested here
              _parentHeap->free (ptr);
                           ^
    source/libhoard.cpp:121:22: note: in instantiation of member function
          'Hoard::ThreadLocalAllocationBuffer<11, getSizeClass, getClassSize, 256,
          262144, Hoard::HoardSuperblock<HL::MacLockType, 65536, Hoard::SmallHeap>,
          65536, Hoard::HoardHeapType>::free' requested here
        getCustomHeap()->free (ptr);
                         ^
    In file included from source/libhoard.cpp:33:
    In file included from Heap-Layers/heaplayers.h:103:
    In file included from Heap-Layers/heaps/all.h:6:
    In file included from Heap-Layers/heaps/combining/all.h:2:
    Heap-Layers/heaps/combining/segheap.h:189:15: error: no member named 'clear' in
          'Hoard::AddHeaderHeap<Hoard::HoardSuperblock<HL::MacLockType, 65536,
          Hoard::BigHeap>, 65536, Hoard::MmapSource>'
          bigheap.clear();
          ~~~~~~~ ^
    include/hoard/thresholdsegheap.h:63:15: note: in instantiation of member
          function 'HL::SegHeap<80, size2class, class2size,
          HL::AdaptHeap<HL::DLList,
          Hoard::AddHeaderHeap<Hoard::HoardSuperblock<HL::MacLockType, 65536,
          Hoard::BigHeap>, 65536, Hoard::MmapSource>>,
          Hoard::AddHeaderHeap<Hoard::HoardSuperblock<HL::MacLockType, 65536,
          Hoard::BigHeap>, 65536, Hoard::MmapSource> >::clear' requested here
              SuperHeap::clear();
                         ^
    Heap-Layers/heaps/threads/lockedheap.h:48:14: note: in instantiation of member
          function 'Hoard::ThresholdSegHeap<20, 65536, 80, size2class, class2size,
          HL::AdaptHeap<HL::DLList,
          Hoard::AddHeaderHeap<Hoard::HoardSuperblock<HL::MacLockType, 65536,
          Hoard::BigHeap>, 65536, Hoard::MmapSource>>,
          Hoard::AddHeaderHeap<Hoard::HoardSuperblock<HL::MacLockType, 65536,
          Hoard::BigHeap>, 65536, Hoard::MmapSource> >::free' requested here
          Super::free (ptr);
                 ^
    Heap-Layers/heaps/threads/threadheap.h:73:21: note: in instantiation of member
          function 'HL::LockedHeap<HL::MacLockType, Hoard::ThresholdSegHeap<20,
          65536, 80, size2class, class2size, HL::AdaptHeap<HL::DLList,
          Hoard::AddHeaderHeap<Hoard::HoardSuperblock<HL::MacLockType, 65536,
          Hoard::BigHeap>, 65536, Hoard::MmapSource>>,
          Hoard::AddHeaderHeap<Hoard::HoardSuperblock<HL::MacLockType, 65536,
          Hoard::BigHeap>, 65536, Hoard::MmapSource>> >::free' requested here
          getHeap(tid)->free (ptr);
                        ^
    Heap-Layers/heaps/combining/hybridheap.h:68:12: note: in instantiation of member
          function 'HL::ThreadHeap<64, HL::LockedHeap<HL::MacLockType,
          Hoard::ThresholdSegHeap<20, 65536, 80, size2class, class2size,
          HL::AdaptHeap<HL::DLList,
          Hoard::AddHeaderHeap<Hoard::HoardSuperblock<HL::MacLockType, 65536,
          Hoard::BigHeap>, 65536, Hoard::MmapSource>>,
          Hoard::AddHeaderHeap<Hoard::HoardSuperblock<HL::MacLockType, 65536,
          Hoard::BigHeap>, 65536, Hoard::MmapSource>>> >::free' requested here
            bm.free (ptr);
               ^
    include/superblocks/ignoreinvalidfree.h:49:13: note: in instantiation of member
          function 'HL::HybridHeap<8192, Hoard::ThreadPoolHeap<2048, 128,
          Hoard::PerThreadHoardHeap>, Hoard::BigHeap>::free' requested here
            SuperHeap::free (ptr);
                       ^
    Heap-Layers/wrappers/ansiwrapper.h:59:19: note: in instantiation of member
          function 'Hoard::IgnoreInvalidFree<HL::HybridHeap<8192,
          Hoard::ThreadPoolHeap<2048, 128, Hoard::PerThreadHoardHeap>,
          Hoard::BigHeap> >::free' requested here
            SuperHeap::free (ptr);
                       ^
    include/superblocks/tlab.h:132:23: note: in instantiation of member function
          'HL::ANSIWrapper<Hoard::IgnoreInvalidFree<HL::HybridHeap<8192,
          Hoard::ThreadPoolHeap<2048, 128, Hoard::PerThreadHoardHeap>,
          Hoard::BigHeap>> >::free' requested here
              _parentHeap->free (ptr);
                           ^
    source/libhoard.cpp:121:22: note: in instantiation of member function
          'Hoard::ThreadLocalAllocationBuffer<11, getSizeClass, getClassSize, 256,
          262144, Hoard::HoardSuperblock<HL::MacLockType, 65536, Hoard::SmallHeap>,
          65536, Hoard::HoardHeapType>::free' requested here
        getCustomHeap()->free (ptr);
                         ^
    In file included from source/libhoard.cpp:33:
    In file included from Heap-Layers/heaplayers.h:103:
    In file included from Heap-Layers/heaps/all.h:1:
    In file included from Heap-Layers/heaps/buildingblock/all.h:1:
    Heap-Layers/heaps/buildingblock/adaptheap.h:81:18: error: no member named
          'clear' in 'Hoard::AddHeaderHeap<Hoard::HoardSuperblock<HL::MacLockType,
          65536, Hoard::BigHeap>, 65536, Hoard::MmapSource>'
          SuperHeap::clear();
                     ^
    Heap-Layers/heaps/combining/segheap.h:184:25: note: in instantiation of member
          function 'HL::AdaptHeap<HL::DLList,
          Hoard::AddHeaderHeap<Hoard::HoardSuperblock<HL::MacLockType, 65536,
          Hoard::BigHeap>, 65536, Hoard::MmapSource> >::clear' requested here
            myLittleHeap[i].clear();
                            ^
    include/hoard/thresholdsegheap.h:63:15: note: in instantiation of member
          function 'HL::SegHeap<80, size2class, class2size,
          HL::AdaptHeap<HL::DLList,
          Hoard::AddHeaderHeap<Hoard::HoardSuperblock<HL::MacLockType, 65536,
          Hoard::BigHeap>, 65536, Hoard::MmapSource>>,
          Hoard::AddHeaderHeap<Hoard::HoardSuperblock<HL::MacLockType, 65536,
          Hoard::BigHeap>, 65536, Hoard::MmapSource> >::clear' requested here
              SuperHeap::clear();
                         ^
    Heap-Layers/heaps/threads/lockedheap.h:48:14: note: in instantiation of member
          function 'Hoard::ThresholdSegHeap<20, 65536, 80, size2class, class2size,
          HL::AdaptHeap<HL::DLList,
          Hoard::AddHeaderHeap<Hoard::HoardSuperblock<HL::MacLockType, 65536,
          Hoard::BigHeap>, 65536, Hoard::MmapSource>>,
          Hoard::AddHeaderHeap<Hoard::HoardSuperblock<HL::MacLockType, 65536,
          Hoard::BigHeap>, 65536, Hoard::MmapSource> >::free' requested here
          Super::free (ptr);
                 ^
    Heap-Layers/heaps/threads/threadheap.h:73:21: note: in instantiation of member
          function 'HL::LockedHeap<HL::MacLockType, Hoard::ThresholdSegHeap<20,
          65536, 80, size2class, class2size, HL::AdaptHeap<HL::DLList,
          Hoard::AddHeaderHeap<Hoard::HoardSuperblock<HL::MacLockType, 65536,
          Hoard::BigHeap>, 65536, Hoard::MmapSource>>,
          Hoard::AddHeaderHeap<Hoard::HoardSuperblock<HL::MacLockType, 65536,
          Hoard::BigHeap>, 65536, Hoard::MmapSource>> >::free' requested here
          getHeap(tid)->free (ptr);
                        ^
    Heap-Layers/heaps/combining/hybridheap.h:68:12: note: in instantiation of member
          function 'HL::ThreadHeap<64, HL::LockedHeap<HL::MacLockType,
          Hoard::ThresholdSegHeap<20, 65536, 80, size2class, class2size,
          HL::AdaptHeap<HL::DLList,
          Hoard::AddHeaderHeap<Hoard::HoardSuperblock<HL::MacLockType, 65536,
          Hoard::BigHeap>, 65536, Hoard::MmapSource>>,
          Hoard::AddHeaderHeap<Hoard::HoardSuperblock<HL::MacLockType, 65536,
          Hoard::BigHeap>, 65536, Hoard::MmapSource>>> >::free' requested here
            bm.free (ptr);
               ^
    include/superblocks/ignoreinvalidfree.h:49:13: note: in instantiation of member
          function 'HL::HybridHeap<8192, Hoard::ThreadPoolHeap<2048, 128,
          Hoard::PerThreadHoardHeap>, Hoard::BigHeap>::free' requested here
            SuperHeap::free (ptr);
                       ^
    Heap-Layers/wrappers/ansiwrapper.h:59:19: note: in instantiation of member
          function 'Hoard::IgnoreInvalidFree<HL::HybridHeap<8192,
          Hoard::ThreadPoolHeap<2048, 128, Hoard::PerThreadHoardHeap>,
          Hoard::BigHeap> >::free' requested here
            SuperHeap::free (ptr);
                       ^
    include/superblocks/tlab.h:132:23: note: in instantiation of member function
          'HL::ANSIWrapper<Hoard::IgnoreInvalidFree<HL::HybridHeap<8192,
          Hoard::ThreadPoolHeap<2048, 128, Hoard::PerThreadHoardHeap>,
          Hoard::BigHeap>> >::free' requested here
              _parentHeap->free (ptr);
                           ^
    source/libhoard.cpp:121:22: note: in instantiation of member function
          'Hoard::ThreadLocalAllocationBuffer<11, getSizeClass, getClassSize, 256,
          262144, Hoard::HoardSuperblock<HL::MacLockType, 65536, Hoard::SmallHeap>,
          65536, Hoard::HoardHeapType>::free' requested here
        getCustomHeap()->free (ptr);
                         ^
    4 errors generated.
    make: *** [macos] Error 1
    
    opened by rptb1 6
  • Fix SIGSEGV

    Fix SIGSEGV

    3.12 is just failing when LD_PRELOADed on Ubuntu Linux 16.04 LTS — on literally any executables' run.

    Is Hoard alive at all? I understand that tcmalloc outperforms it a bit (and is under active development for sure) but it'd be great to know the status for sure as well.

    opened by poige 4
  • Nmake error

    Nmake error

    \Hoard\src>nmake
    
    Microsoft (R) Program Maintenance Utility Version 14.00.24210.0
    Copyright (C) Microsoft Corporation.  All rights reserved.
    
    GNUmakefile Heap-Layers include Makefile README.md source test test.sh
    This Makefile is for Windows only. For other systems, use gmake.
    GNUmakefile Heap-Layers include Makefile README.md source test test.sh
            git submodule update --init --checkout --recursive
            cl /I. /Iinclude /Iinclude/util /Iinclude/hoard /Iinclude/superblocks /IHeap-Layers /D "NDEBUG" /D "_WINDOWS" /D "_WINDLL" /D "_WINRT_DLL" /D "_UNICODE" /D "UNICODE" /Zi /Ox /MD /nologo /W1 /WX- /Ox /Oi /Oy- /Gm- /EHsc /MD /GS /Gy /Zc:wchar_t /Zc:forScope /Gd /errorReport:queue "source\libhoard.cpp" "Heap-Layers\wrappers\winwrapper.cpp" "source\wintls.cpp" /GL /link /DLL /subsystem:console /OUT:libhoard.dll
    libhoard.cpp
    \Hoard\src\Heap-Layers\heaplayers.h(41): fatal error C1083: Cannot open include file: 'assert.h': No such file or directory
    winwrapper.cpp
    Heap-Layers\wrappers\winwrapper.cpp(38): fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
    wintls.cpp
    source\wintls.cpp(37): fatal error C1083: Cannot open include file: 'new': No such file or directory
    NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\cl.EXE"' : return code '0x2'
    Stop.
    

    Not very sure where to go with this. Any help would be appreciated. Another question while I'm at it how effective is hoard with games?

    opened by Matt-Is-Confused 4
  • difficulties building from src, linux x86_64 gcc 4.6.3

    difficulties building from src, linux x86_64 gcc 4.6.3

    hitting an error and some warnings attempting to build

    • libhoard-3.9.tar.gz
    • Ubuntu Linux 12.04 (x86_64)
    • g++ (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
    • make linux-gcc-x86-64 Relevant tail of build output below. Suggestions?

    ... heaplayers/wrappers/gnuwrapper.cpp:68:42: error: conflicting declaration 'void (* __malloc_initialize_hook)()' /usr/include/malloc.h:170:38: error: '__malloc_initialize_hook' has a previous declaration as 'void (* volatile __malloc_initialize_hook)()'

    heaplayers/wrappers/gnuwrapper.cpp: In function 'void my_init_hook()': heaplayers/wrappers/gnuwrapper.cpp:72:23: warning: '__malloc_hook' is deprecated (declared at /usr/include/malloc.h:176) [-Wdeprecated-declarations] heaplayers/wrappers/gnuwrapper.cpp:73:21: warning: '__free_hook' is deprecated (declared at /usr/include/malloc.h:173) [-Wdeprecated-declarations] heaplayers/wrappers/gnuwrapper.cpp:74:24: warning: '__realloc_hook' is deprecated (declared at /usr/include/malloc.h:179) [-Wdeprecated-declarations] heaplayers/wrappers/gnuwrapper.cpp:75:25: warning: '__memalign_hook' is deprecated (declared at /usr/include/malloc.h:183) [-Wdeprecated-declarations] heaplayers/wrappers/gnuwrapper.cpp:78:5: warning: '__malloc_hook' is deprecated (declared at /usr/include/malloc.h:176) [-Wdeprecated-declarations] heaplayers/wrappers/gnuwrapper.cpp:79:5: warning: '__free_hook' is deprecated (declared at /usr/include/malloc.h:173) [-Wdeprecated-declarations] heaplayers/wrappers/gnuwrapper.cpp:80:5: warning: '__realloc_hook' is deprecated (declared at /usr/include/malloc.h:179) [-Wdeprecated-declarations] heaplayers/wrappers/gnuwrapper.cpp:81:5: warning: '__memalign_hook' is deprecated (declared at /usr/include/malloc.h:183) [-Wdeprecated-declarations]

    opened by sharpav 4
  • Build fail on gcc11

    Build fail on gcc11

    Build command DEBUG: g++ -I/usr/include/nptl -fno-builtin-malloc -pipe -g -std=c++14 -O3 -DNDEBUG -ffast-math -fno-builtin-malloc -Wall -Wextra -Wshadow -Wconversion -Wuninitialized -finline-limit=20000 -finline-functions -DNDEBUG -I. -Iinclude -Iinclude/util -Iinclude/hoard -Iinclude/superblocks -IHeap-Layers -D_REENTRANT=1 -shared source/libhoard.cpp source/unixtls.cpp Heap-Layers/wrappers/gnuwrapper.cpp -Bsymbolic -o libhoard.so -ldl -lpthread

    Fail link stage: DEBUG: /usr/bin/x86_64-openmandriva-linux-gnu-ld: /tmp/ccTM1SUm.o: relocation R_X86_64_32 against symbol_ZGVZN2HL10ExactlyOneINS_10LockedHeapINS_12SpinLockTypeEN5Hoard19AlignedMmapInstanceILm2097152EEEEEEclEvE21theOneTrueInstancePtr' can not be used when making a shared object; recompile with -fPIC DEBUG: /usr/bin/x86_64-openmandriva-linux-gnu-ld: /tmp/cc830SjM.o: relocation R_X86_64_32S against symbol _ZZN5Hoard18GeometricSizeClassILm20ELm16EE3c2sEiE5sizes' can not be used when making a shared object; recompile with -fPIC DEBUG: /usr/bin/x86_64-openmandriva-linux-gnu-ld: /tmp/ccu9r8d4.o: relocation R_X86_64_32 against symbolxxmalloc_unlock' can not be used when making a shared object; recompile with -fPIC DEBUG: /usr/bin/x86_64-openmandriva-linux-gnu-ld: /tmp/cc830SjM.o: warning: relocation against _ZGVZN5Hoard18GeometricSizeClassILm20ELm16EE3c2sEiE4init' in read-only section.text' `

    opened by Pro-pra 3
  • New release?

    New release?

    Hi, I'm trying to update the out of date hoard port in MacPorts to the latest version 3.12 but I'm getting this build failure, on macOS 10.13.6 with Xcode 9.4.1:

    In file included from source/libhoard.cpp:33:
    In file included from Heap-Layers/heaplayers.h:106:
    In file included from Heap-Layers/heaps/all.h:2:
    In file included from Heap-Layers/heaps/./debug/all.h:4:
    In file included from Heap-Layers/heaps/./debug/sanitycheckheap.h:13:
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/map:818:5: error: static_assert failed "Allocator::value_type must be same type as value_type"
        static_assert((is_same<typename allocator_type::value_type, value_type>::value),
        ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Heap-Layers/heaps/./debug/sanitycheckheap.h:110:13: note: in instantiation of template class 'std::__1::map<void *, unsigned long, std::__1::less<void *>, HL::STLAllocator<std::__1::pair<const void *, unsigned long>, HL::FreelistHeap<HL::ZoneHeap<HL::MmapHeap, 16384> > > >' requested here
        mapType allocatedObjects;
                ^
    Heap-Layers/heaps/./debug/sanitycheckheap.h:64:16: error: no type named 'iterator' in 'std::__1::map<void *, unsigned long, std::__1::less<void *>, HL::STLAllocator<std::__1::pair<const void *, unsigned long>, HL::FreelistHeap<HL::ZoneHeap<HL::MmapHeap, 16384> > > >'
          mapType::iterator i;
          ~~~~~~~~~^
    Heap-Layers/heaps/./debug/sanitycheckheap.h:88:16: error: no type named 'iterator' in 'std::__1::map<void *, unsigned long, std::__1::less<void *>, HL::STLAllocator<std::__1::pair<const void *, unsigned long>, HL::FreelistHeap<HL::ZoneHeap<HL::MmapHeap, 16384> > > >'
          mapType::iterator i;
          ~~~~~~~~~^
    

    I tried master (Hoard May 24 2018, Heap-Layers Oct 17 2018) and it builds, but I would rather not update the MacPorts port to some random point in time of your repositories. Is a new stable release planned at some point to which I could then update the port?

    Would be great if, when you make a new release, you could provide a tarball containing the complete source code of Hoard and Heap-Layers and attach it to the GitHub release, like you did before for version 3.10, so we don't have to clone from git.

    opened by ryandesign 3
  • Crashing on Windows while doing make_shared for a shared_ptr

    Crashing on Windows while doing make_shared for a shared_ptr

    Am using Hoard in my application to run on both Linux and Windows. While it runs perfectly fine on Linux on Windows after some allocations it crashes at a std::make_shared for an object. Its gets a "Exception thrown at 0x00007FF6E568FCDE in : Access violation writing location 0x00007FF6E5778078". Does it require any specific configuration for Windows? I have followed the exact instructions to link to libhoard.dll and also my application loads it too but after some random number of allocations it crashes the application. The application works fine without Hoard. Am using Visual Studio 2015 community version on Windows 10 host.

    opened by sirilvk 3
  • Failed to allocate more than 2147483647 bytes of memory

    Failed to allocate more than 2147483647 bytes of memory

    I wanted to evaluate the Hoard for one of the project but i observed that Hoard fails to allocate more than 2GB of memory. I built the Hoard 3.12 with g++ version 4.9.0 on Linux. Is there any limitation with the Hoard for the memory allocation. If not what could be wrong? The allocation for 2147483647 bytes succeeds and allocation for 2147483648 onward fails.

    Below are the g++ and Linux details:

    	g++ --version
    	g++ (GCC) 4.9.0 20130520 (experimental)
    	Copyright (C) 2013 Free Software Foundation, Inc.
    	This is free software; see the source for copying conditions.  There is NO
    	warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    
    	uname -a
    	Linux xxx.xxx.com 2.6.32-279.el6.x86_64 #1 SMP Fri Jun 22 12:19:21 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
    

    Attached here AllocMem.zip the sample program. Below the sample program output for allocations:

    With Default gcc allocator:

    	./AllocMem 2147483648
    	Trying to allocate 2147483648 bytes of memory
    	Successfully allocated 2147483648 bytes of memory
    

    With Hoard Allocator:

    	export LD_PRELOAD=/data/local/MemoryAllocators/Hoard/libhoard.so
    	./AllocMem 2147483648
    	Trying to allocate 2147483648 bytes of memory
    	Failed to allocate 2147483648 bytes of memory
    
    opened by rudreshahk 3
  • Crashing on launch

    Crashing on launch

    I compiled Hoard with Visual Studio 2022 NMake - the only required change was:

    void * __attribute__((flatten)) xxmalloc (size_t sz) __attribute__((alloc_size(1))) __attribute((malloc)) to void * [[forceinline]] xxmalloc (size_t sz)

    (more on this later). However, after linking with my exe, there is a crash while trying to initialize the heap (?)

     	ntdll.dll!RtlReportCriticalFailure()	Unknown
     	ntdll.dll!RtlpHeapHandleError()	Unknown
     	ntdll.dll!RtlpHpHeapHandleError()	Unknown
     	ntdll.dll!RtlpLogHeapFailure()	Unknown
     	ntdll.dll!RtlSizeHeap()	Unknown
     	ucrtbase.dll!_recalloc_base()	Unknown
     	ucrtbase.dll!<lambda>(void)()	Unknown
     	ucrtbase.dll!__crt_seh_guarded_call<int>::operator()<<lambda_638799b9deba96c50f710eeac98168cd>,<lambda>(void) &,<lambda_a6f7d7db0129f75315ebf26d50c089f1>>()	Unknown
     	ucrtbase.dll!_register_onexit_function()	Unknown
    >	GPEGEncoder.exe!_onexit(int(*)() function) Line 261	C++
     	GPEGEncoder.exe!atexit(void(*)() function) Line 275	C++
     	ucrtbase.dll!_initterm()	Unknown
     	GPEGEncoder.exe!__scrt_common_main_seh() Line 258	C++
     	kernel32.dll!BaseThreadInitThunk()	Unknown
     	ntdll.dll!RtlUserThreadStart()	Unknown
    

    I will try to track this down some more, but do you have any tips in the meantime?

    It's a single exe compiled with Visual Studio 2022 Community (the free version) to the C++20 standard - could that be the issue?

    Speaking on C++20, [[forceinline]] is part of that standard - and I think [[msvc::forceinline]] is part of the C++17 standard - with the current compile it's just ignored.

    Also, the array of Patch class doesn't compile in Heap-Layers in C++20 - there needs to be a nullptr added for the original FARPROC. Old C++ compilation automatically casted the bool to a nullptr, but C++20 doesn't allow that.

    If Hoard does what it says on the tin and mitigates allocation locks in multithreaded code, I'm very excited to get this to work!

    I can help fix up these issues and give a PR if you like, but I need to get it to work first.

    Cheers John

    opened by JohnJScott 1
  • [feature] Support CMake build system.

    [feature] Support CMake build system.

    Feature Request

    CMake is more popular and well-integrated with lots of IDEs. Therefore, I hope Hoard can:

    • Support using CMake to build the project.
    • Provide HoardConfig.cmake file for using find_package() in CONFIG mode after installation.
    • Provide IMPORTED library targets in form of Hoard::Hoard or Hoard::<component>.
    opened by hwhsu1231 0
  • libhoard.dll fails to load in a JNI application.

    libhoard.dll fails to load in a JNI application.

    H, I am trying to take advantage of Hoard in a JNI based c++ application(Windows10). I built 64bit hoard and when I try to load libhoard.dll it crashes with below error.

    java.lang.UnsatisfiedLinkError: <PATH>libhoard.dll: A dynamic link library (DLL) initialization routine failed
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824)
    at java.lang.Runtime.load0(Runtime.java:809)
    at java.lang.System.load(System.java:1086)
    

    Crash log:

     A fatal error has been detected by the Java Runtime Environment:
    
      EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ffa4e631960, pid=76672, tid=0x000000000000cecc
    
     JRE version: Java(TM) SE Runtime Environment (8.0_191-b12) (build 1.8.0_191-b12)
     Java VM: Java HotSpot(TM) 64-Bit Server VM (25.191-b12 mixed mode windows-amd64 compressed oops)
     Problematic frame:
     C  0x00007ffa4e631960
    

    Is this even possible?

    opened by bdarwin 0
  • Application crash

    Application crash

    Hi,

    I built the latest released version 3.13.0 of libHoard, 64bit (using x64 Native Tools Comand Prompt for Visual Studio 2019) under Windows 10 and linked it to 2 x64 C++ libraries (both built with Visual Studio 2019 as x64 multi threaded DLL (/MD)).

    When I start my test application (C#, Console) - I see the message Using the Hoard memory allocator (http://www.hoard.org), version 3.13.0 After this test application crashes without any error message or additional information.

    In the Windows Error Reporting I see several crash reports for libhoard, the first one looks like this

    Faulting application name: Performance.exe, version: 1.0.0.0, time stamp: 0xfae61b15
    Faulting module name: libhoard.dll, version: 0.0.0.0, time stamp: 0x61f8fd6c
    Exception code: 0xc0000005
    Fault offset: 0x0000000000006f2d
    Faulting process id: 0xb80
    Faulting application start time: 0x01d81752962175ee
    Faulting application path: C:\Temp\Performance.exe
    Faulting module path: C:\Temp\libhoard.dll
    Report Id: df81726f-4052-4a97-a5cb-2a3635c4d983
    Faulting package full name: 
    Faulting package-relative application ID: 
    
    Additional information stored by Windows Error Reporting:
    Version=1
    EventType=APPCRASH
    EventTime=132881832504435930
    ReportType=2
    Consent=1
    UploadTime=132881832537910530
    ReportStatus=268435456
    ReportIdentifier=b9734760-a2b5-46ac-bb03-7fb5e6d4fb7a
    IntegratorReportIdentifier=df81726f-4052-4a97-a5cb-2a3635c4d983
    Wow64Host=34404
    NsAppName=Performance.exe
    OriginalFilename=Performance.exe
    AppSessionGuid=00000b80-0002-0004-ee75-21965217d801
    TargetAppId=W:000678df128851180f82fc6fdbf55c8cd95d00000000!0000a65f81583cc786c9bd4cecb487ba28a3378a6d67!Performance.exe
    TargetAppVer=2103//05//23:17:23:33!0!Performance.exe
    BootId=4294967295
    ServiceSplit=4243460608
    TargetAsId=186388
    IsFatal=1
    EtwNonCollectReason=1
    Response.BucketId=6e867a30a8d06c386e258dfad0c22f95
    Response.BucketTable=4
    Response.LegacyBucketId=2172298503659859861
    Response.type=4
    Sig[0].Name=Anwendungsname
    Sig[0].Value=Performance.exe
    Sig[1].Name=Anwendungsversion
    Sig[1].Value=1.0.0.0
    Sig[2].Name=Anwendungszeitstempel
    Sig[2].Value=fae61b15
    Sig[3].Name=Fehlermodulname
    Sig[3].Value=libhoard.dll
    Sig[4].Name=Fehlermodulversion
    Sig[4].Value=0.0.0.0
    Sig[5].Name=Fehlermodulzeitstempel
    Sig[5].Value=61f8fd6c
    Sig[6].Name=Ausnahmecode
    Sig[6].Value=c0000005
    Sig[7].Name=Ausnahmeoffset
    Sig[7].Value=0000000000006f2d
    DynamicSig[1].Name=Betriebsystemversion
    DynamicSig[1].Value=10.0.19042.2.0.0.256.4
    DynamicSig[2].Name=Gebietsschema-ID
    DynamicSig[2].Value=1031
    DynamicSig[22].Name=Zusatzinformation 1
    DynamicSig[22].Value=3e2e
    DynamicSig[23].Name=Zusatzinformation 2
    DynamicSig[23].Value=3e2ea001e22a9f1f30a906a8a1538ef7
    DynamicSig[24].Name=Zusatzinformation 3
    DynamicSig[24].Value=377b
    DynamicSig[25].Name=Zusatzinformation 4
    DynamicSig[25].Value=377b821227179b78965e4f477f2f75cb
    UI[2]=C:\Temp\Performance.exe
    LoadedModule[0]=C:\Temp\Performance.exe
    LoadedModule[1]=C:\WINDOWS\SYSTEM32\ntdll.dll
    LoadedModule[2]=C:\WINDOWS\SYSTEM32\MSCOREE.DLL
    LoadedModule[3]=C:\WINDOWS\System32\KERNEL32.dll
    LoadedModule[4]=C:\WINDOWS\System32\KERNELBASE.dll
    LoadedModule[5]=C:\Program Files (x86)\Citrix\ICA Client\epclient64.dll
    LoadedModule[6]=C:\WINDOWS\System32\USER32.dll
    LoadedModule[7]=C:\WINDOWS\System32\win32u.dll
    LoadedModule[8]=C:\WINDOWS\System32\GDI32.dll
    LoadedModule[9]=C:\WINDOWS\System32\gdi32full.dll
    LoadedModule[10]=C:\WINDOWS\System32\msvcp_win.dll
    LoadedModule[11]=C:\WINDOWS\System32\ucrtbase.dll
    LoadedModule[12]=C:\WINDOWS\SYSTEM32\VERSION.dll
    LoadedModule[13]=C:\WINDOWS\System32\msvcrt.dll
    LoadedModule[14]=C:\WINDOWS\System32\IMM32.DLL
    LoadedModule[15]=C:\WINDOWS\System32\ADVAPI32.dll
    LoadedModule[16]=C:\WINDOWS\System32\sechost.dll
    LoadedModule[17]=C:\WINDOWS\System32\RPCRT4.dll
    LoadedModule[18]=C:\WINDOWS\SYSTEM32\ntmarta.dll
    LoadedModule[19]=C:\WINDOWS\System32\umppc14406.dll
    LoadedModule[20]=C:\WINDOWS\System32\ScriptControl64_14406.dll
    LoadedModule[21]=C:\WINDOWS\System32\bcrypt.dll
    LoadedModule[22]=C:\WINDOWS\System32\ole32.dll
    LoadedModule[23]=C:\WINDOWS\System32\combase.dll
    LoadedModule[24]=C:\WINDOWS\System32\OLEAUT32.dll
    LoadedModule[25]=C:\Program Files\Avecto\Privilege Guard Client\PGHook.dll
    LoadedModule[26]=C:\WINDOWS\System32\QIPCAP64.dll
    LoadedModule[27]=C:\WINDOWS\System32\SHELL32.dll
    LoadedModule[28]=C:\WINDOWS\SYSTEM32\DNSAPI.dll
    LoadedModule[29]=C:\WINDOWS\SYSTEM32\IPHLPAPI.DLL
    LoadedModule[30]=C:\WINDOWS\System32\NSI.dll
    LoadedModule[31]=C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscoreei.dll
    LoadedModule[32]=C:\WINDOWS\System32\SHLWAPI.dll
    LoadedModule[33]=C:\WINDOWS\SYSTEM32\kernel.appcore.dll
    LoadedModule[34]=C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
    LoadedModule[35]=C:\WINDOWS\SYSTEM32\VCRUNTIME140_CLR0400.dll
    LoadedModule[36]=C:\WINDOWS\SYSTEM32\ucrtbase_clr0400.dll
    LoadedModule[37]=C:\WINDOWS\assembly\NativeImages_v4.0.30319_64\mscorlib\ed4777cae83e1fc9087ac3dc82cf23ab\mscorlib.ni.dll
    LoadedModule[38]=C:\WINDOWS\System32\bcryptPrimitives.dll
    LoadedModule[39]=C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clrjit.dll
    LoadedModule[40]=C:\WINDOWS\SYSTEM32\urlmon.dll
    LoadedModule[41]=C:\WINDOWS\SYSTEM32\iertutil.dll
    LoadedModule[42]=C:\WINDOWS\System32\shcore.dll
    LoadedModule[43]=C:\WINDOWS\SYSTEM32\srvcli.dll
    LoadedModule[44]=C:\WINDOWS\SYSTEM32\netutils.dll
    LoadedModule[45]=C:\WINDOWS\assembly\NativeImages_v4.0.30319_64\netstandard\c9a24a0de13504786286f18c7c10ba59\netstandard.ni.dll
    LoadedModule[46]=C:\WINDOWS\SYSTEM32\CRYPTSP.dll
    LoadedModule[47]=C:\WINDOWS\SYSTEM32\SspiCli.dll
    LoadedModule[48]=C:\WINDOWS\system32\rsaenh.dll
    LoadedModule[49]=C:\WINDOWS\SYSTEM32\CRYPTBASE.dll
    LoadedModule[50]=C:\WINDOWS\assembly\NativeImages_v4.0.30319_64\System\5dd302cc18514670950e7f3fbebddb06\System.ni.dll
    LoadedModule[51]=C:\WINDOWS\assembly\NativeImages_v4.0.30319_64\System.Core\5b420a81d9bf78ed0945d8ac1ca932b4\System.Core.ni.dll
    LoadedModule[52]=C:\WINDOWS\SYSTEM32\windows.storage.dll
    LoadedModule[53]=C:\WINDOWS\SYSTEM32\Wldp.dll
    LoadedModule[54]=C:\WINDOWS\assembly\NativeImages_v4.0.30319_64\System.ValueTuple\cab3ebbf1280dc8b0dd1638592019546\System.ValueTuple.ni.dll
    LoadedModule[55]=C:\WINDOWS\SYSTEM32\PROPSYS.dll
    LoadedModule[56]=C:\WINDOWS\assembly\NativeImages_v4.0.30319_64\System.Xml.Linq\7d5777c130d020ebe3c89b79f238ccd5\System.Xml.Linq.ni.dll
    LoadedModule[57]=C:\WINDOWS\assembly\NativeImages_v4.0.30319_64\System.Drawing\f4b470d059025978bbe597afc6e60f7d\System.Drawing.ni.dll
    LoadedModule[58]=C:\WINDOWS\SYSTEM32\profapi.dll
    LoadedModule[59]=C:\WINDOWS\assembly\NativeImages_v4.0.30319_64\System.Xml\131a023309990432765d7a97ec31d6a7\System.Xml.ni.dll
    LoadedModule[60]=C:\Temp\FuncParserNative.dll
    LoadedModule[61]=C:\Temp\libhoard.dll
    LoadedModule[62]=C:\WINDOWS\SYSTEM32\MSVCP140.dll
    LoadedModule[63]=C:\WINDOWS\SYSTEM32\VCRUNTIME140.dll
    LoadedModule[64]=C:\WINDOWS\SYSTEM32\VCRUNTIME140_1.dll
    State[0].Key=Transport.DoneStage1
    State[0].Value=1
    OsInfo[0].Key=vermaj
    OsInfo[0].Value=10
    OsInfo[1].Key=vermin
    OsInfo[1].Value=0
    OsInfo[2].Key=verbld
    OsInfo[2].Value=19042
    OsInfo[3].Key=ubr
    OsInfo[3].Value=1415
    OsInfo[4].Key=versp
    OsInfo[4].Value=0
    OsInfo[5].Key=arch
    OsInfo[5].Value=9
    OsInfo[6].Key=lcid
    OsInfo[6].Value=1031
    OsInfo[7].Key=geoid
    OsInfo[7].Value=94
    OsInfo[8].Key=sku
    OsInfo[8].Value=4
    OsInfo[9].Key=domain
    OsInfo[9].Value=1
    OsInfo[10].Key=prodsuite
    OsInfo[10].Value=256
    OsInfo[11].Key=ntprodtype
    OsInfo[11].Value=1
    OsInfo[12].Key=platid
    OsInfo[12].Value=10
    OsInfo[13].Key=sr
    OsInfo[13].Value=0
    OsInfo[14].Key=tmsi
    OsInfo[14].Value=33749
    OsInfo[15].Key=osinsty
    OsInfo[15].Value=3
    OsInfo[16].Key=iever
    OsInfo[16].Value=11.789.19041.0-11.0.1000
    OsInfo[17].Key=portos
    OsInfo[17].Value=0
    OsInfo[18].Key=ram
    OsInfo[18].Value=32614
    OsInfo[19].Key=svolsz
    OsInfo[19].Value=475
    OsInfo[20].Key=wimbt
    OsInfo[20].Value=0
    OsInfo[21].Key=blddt
    OsInfo[21].Value=191206
    OsInfo[22].Key=bldtm
    OsInfo[22].Value=1406
    OsInfo[23].Key=bldbrch
    OsInfo[23].Value=vb_release
    OsInfo[24].Key=bldchk
    OsInfo[24].Value=0
    OsInfo[25].Key=wpvermaj
    OsInfo[25].Value=0
    OsInfo[26].Key=wpvermin
    OsInfo[26].Value=0
    OsInfo[27].Key=wpbuildmaj
    OsInfo[27].Value=0
    OsInfo[28].Key=wpbuildmin
    OsInfo[28].Value=0
    OsInfo[29].Key=osver
    OsInfo[29].Value=10.0.19041.1415.amd64fre.vb_release.191206-1406
    OsInfo[30].Key=buildflightid
    OsInfo[30].Value=0AB10A92-A0AB-46D3-A7F0-01F9994D9C9B.1
    OsInfo[31].Key=edition
    OsInfo[31].Value=Enterprise
    OsInfo[32].Key=ring
    OsInfo[32].Value=Retail
    OsInfo[33].Key=expid
    OsInfo[33].Value=RS:D718
    OsInfo[34].Key=fconid
    OsInfo[35].Key=containerid
    OsInfo[36].Key=containertype
    OsInfo[37].Key=edu
    OsInfo[37].Value=0
    FriendlyEventName=Nicht mehr funktionsfähig
    ConsentKey=APPCRASH
    AppName=Performance
    AppPath=C:\Temp\Performance.exe
    NsPartner=windows
    NsGroup=windows8
    ApplicationIdentity=8CC3251C8D92713F45DFBF996E2EC8CD
    MetadataHash=-1995047448
    

    Can you advice if/how this crash can be fixed? Thank you.

    P.S. Trying to build the latest development version with Visual Studio 2019 results in the same error as here: #65

    opened by Yuri05 1
  • Build issue on Visual Studio 2019

    Build issue on Visual Studio 2019

    Hello,

    There is a build issue in the file source/libhoard.cpp:119:

    source\libhoard.cpp(119): error C2065: 'flatten': undeclared identifier
    source\libhoard.cpp(119): error C2146: syntax error: missing ';' before identifier 'xxmalloc'
    source\libhoard.cpp(119): error C3646: '__attribute__': unknown override specifier
    source\libhoard.cpp(119): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    source\libhoard.cpp(119): error C2556: 'int xxmalloc(size_t)': overloaded function differs only by return type from 'void *xxmalloc(size_t)'
    D:\git-repositories\Hoard\src\Heap-Layers/wrappers/generic-memalign.cpp(15): note: see declaration of 'xxmalloc'
    source\libhoard.cpp(119): error C2040: 'xxmalloc': 'int (size_t)' differs in levels of indirection from 'void *(size_t)'
    source\libhoard.cpp(119): error C2059: syntax error: '('
    source\libhoard.cpp(119): error C2143: syntax error: missing ')' before '('
    source\libhoard.cpp(119): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    source\libhoard.cpp(119): error C2059: syntax error: ')'
    source\libhoard.cpp(119): error C2146: syntax error: missing ';' before identifier '__attribute'
    source\libhoard.cpp(121): error C2143: syntax error: missing ';' before '{'
    source\libhoard.cpp(121): error C2447: '{': missing function header (old-style formal list?)
    

    AFAIK, __attribute__ is not supported by MSVC. The DLL can be built without them, but I am not sure this is fine. Maybe a MSVC equivalent should be used instead.

    Thank you.

    opened by zephyr111 2
Releases(3.13)
Owner
Emery Berger
Professor of Computer Science, UMass Amherst. Co-director of @plasma-umass.
Emery Berger
STL compatible C++ memory allocator library using a new RawAllocator concept that is similar to an Allocator but easier to use and write.

memory The C++ STL allocator model has various flaws. For example, they are fixed to a certain type, because they are almost necessarily required to b

Jonathan Müller 1.2k Dec 26, 2022
STL compatible C++ memory allocator library using a new RawAllocator concept that is similar to an Allocator but easier to use and write.

STL compatible C++ memory allocator library using a new RawAllocator concept that is similar to an Allocator but easier to use and write.

Jonathan Müller 1k Dec 2, 2021
Hardened malloc - Hardened allocator designed for modern systems

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.

GrapheneOS 893 Jan 3, 2023
jemalloc websitejemalloc - General purpose malloc(3) implementation that emphasizes fragmentation avoidance and scalable concurrency support. [BSD] website

jemalloc is a general purpose malloc(3) implementation that emphasizes fragmentation avoidance and scalable concurrency support. jemalloc first came

jemalloc memory allocator 7.7k Jan 7, 2023
Mesh - A memory allocator that automatically reduces the memory footprint of C/C++ applications.

Mesh: Compacting Memory Management for C/C++ Mesh is a drop in replacement for malloc(3) that can transparently recover from memory fragmentation with

PLASMA @ UMass 1.5k Dec 30, 2022
Public domain cross platform lock free thread caching 16-byte aligned memory allocator implemented in C

rpmalloc - General Purpose Memory Allocator This library provides a public domain cross platform lock free thread caching 16-byte aligned memory alloc

Mattias Jansson 1.7k Dec 28, 2022
A tiny portable C89 memory allocator

mem A tiny portable C89 memory allocator. Usage This is a single-header library. You must include this file alongside #define MEM_IMPLEMENTATION in on

null 11 Nov 20, 2022
Allocator bench - bench of various memory allocators

To run benchmarks Install lockless from https://locklessinc.com/downloads/ in lockless_allocator path make Install Hoard from https://github.com/emery

Sam 47 Dec 4, 2022
Custom implementation of C stdlib malloc(), realloc(), and free() functions.

C-Stdlib-Malloc-Implementation NOT INTENDED TO BE COMPILED AND RAN, DRIVER CODE NOT OWNED BY I, ARCINI This is a custom implmentation of the standard

Alex Cini 1 Dec 27, 2021
Test your malloc protection

Test your allocs protections and leaks ! Report Bug · Request Feature Table of Contents About The Tool Getting Started Prerequisites Quickstart Usage

tmatis 49 Dec 7, 2022
A poggers malloc implementation

pogmalloc(3) A poggers malloc implementation Features Static allocator Real heap allocator (via sbrk(2)) Builtin GC Can also mark static memory Can be

Ariel Simulevski 2 Jun 12, 2022
Mimalloc-bench - Suite for benchmarking malloc implementations.

Mimalloc-bench Suite for benchmarking malloc implementations, originally developed for benchmarking mimalloc. Collection of various benchmarks from th

Daan 186 Dec 24, 2022
mimalloc is a compact general purpose allocator with excellent performance.

mimalloc mimalloc (pronounced "me-malloc") is a general purpose allocator with excellent performance characteristics. Initially developed by Daan Leij

Microsoft 7.6k Dec 30, 2022
Snmalloc - Message passing based allocator

snmalloc snmalloc is a high-performance allocator. snmalloc can be used directly in a project as a header-only C++ library, it can be LD_PRELOADed on

Microsoft 1.1k Jan 9, 2023
Using shared memory to communicate between two executables or processes, for Windows, Linux and MacOS (posix). Can also be useful for remote visualization/debugging.

shared-memory-example Using shared memory to communicate between two executables or processes, for Windows, Linux and MacOS (posix). Can also be usefu

null 9 Aug 17, 2022
Fast C++ IPC using shared memory

Fast C++ IPC using shared memory

Dheeraj R Reddy 397 Dec 14, 2022
Test cpu and memory speed at linux-vps

Тест скорости процессора и памяти на linux-vps. Занимается бессмысленным перемножением массивов случайных чисел, для определения скорости процессора и

Anton 3 Nov 30, 2021
MMCTX (Memory Management ConTeXualizer), is a tiny (< 300 lines), single header C99 library that allows for easier memory management by implementing contexts that remember allocations for you and provide freeall()-like functionality.

MMCTX (Memory Management ConTeXualizer), is a tiny (< 300 lines), single header C99 library that allows for easier memory management by implementing contexts that remember allocations for you and provide freeall()-like functionality.

A.P. Jo. 4 Oct 2, 2021
Custom memory allocators in C++ to improve the performance of dynamic memory allocation

Table of Contents Introduction Build instructions What's wrong with Malloc? Custom allocators Linear Allocator Stack Allocator Pool Allocator Free lis

Mariano Trebino 1.4k Jan 2, 2023