All Projects β†’ tarantool β†’ Small

tarantool / Small

Licence: other
Specialized memory allocators

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Small

GC
A lightweight conservative garbage collector for C/C++
Stars: ✭ 108 (+52.11%)
Mutual labels:  memory-allocation
Jvm
πŸ€— JVM εΊ•ε±‚εŽŸη†ζœ€ε…¨ηŸ₯θ―†ζ€»η»“
Stars: ✭ 7,756 (+10823.94%)
Mutual labels:  memory-allocation
Stackext
Header-only C++ library for working with an extended stack
Stars: ✭ 27 (-61.97%)
Mutual labels:  memory-allocation
smalloc
SMalloc -- a *static* memory allocator.
Stars: ✭ 22 (-69.01%)
Mutual labels:  memory-allocation
Larray
Large off-heap arrays and mmap files for Scala and Java
Stars: ✭ 370 (+421.13%)
Mutual labels:  memory-allocation
Php Memory Profiler
Memory leak profiler for PHP
Stars: ✭ 544 (+666.2%)
Mutual labels:  memory-allocation
mulle-allocator
πŸ”„ Flexible C memory allocation scheme
Stars: ✭ 77 (+8.45%)
Mutual labels:  memory-allocation
Memory Allocators
Custom memory allocators in C++ to improve the performance of dynamic memory allocation
Stars: ✭ 948 (+1235.21%)
Mutual labels:  memory-allocation
Scalene
Scalene: a high-performance, high-precision CPU, GPU, and memory profiler for Python
Stars: ✭ 4,819 (+6687.32%)
Mutual labels:  memory-allocation
Sralloc
Memory allocators
Stars: ✭ 25 (-64.79%)
Mutual labels:  memory-allocation
zee alloc
tiny Zig allocator primarily targeting WebAssembly
Stars: ✭ 58 (-18.31%)
Mutual labels:  memory-allocation
Heap Layers
Heap Layers: An Extensible Memory Allocation Infrastructure
Stars: ✭ 260 (+266.2%)
Mutual labels:  memory-allocation
Hoard
The Hoard Memory Allocator: A Fast, Scalable, and Memory-efficient Malloc for Linux, Windows, and Mac.
Stars: ✭ 758 (+967.61%)
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 (-80.28%)
Mutual labels:  memory-allocation
Memory
STL compatible C++ memory allocator library using a new RawAllocator concept that is similar to an Allocator but easier to use and write.
Stars: ✭ 875 (+1132.39%)
Mutual labels:  memory-allocation
bbai-lib
C++ library for getting the most out of polymorphic allocators
Stars: ✭ 41 (-42.25%)
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 (+564.79%)
Mutual labels:  memory-allocation
Memstrack
A memory allocation tracer combined with stack trace.
Stars: ✭ 60 (-15.49%)
Mutual labels:  memory-allocation
Jvmsounds
Play memory allocation rate and GC events as sine wave and percussion, respectively.
Stars: ✭ 28 (-60.56%)
Mutual labels:  memory-allocation
Os Lab
Codes pertaining to OS Lab for Course CO254 - Operating Systems Lab
Stars: ✭ 20 (-71.83%)
Mutual labels:  memory-allocation

small - a collection of Specialized Memory ALLocators for small allocations

Build Status

The library provides the following facilities:

quota

Set a limit on the amount of memory all allocators use. Thread-safe.

slab_arena

To initialize an arena, you need a quota. Multiple arenas can use a shared quota object. Thread safe.

Defines an API with two methods: map() and unmap(). Map returns a memory area. Unmap returns this area to the arena. All objects returned by arena have the same size, defined in initialization-time constant SLAB_MAX_SIZE. By default, SLAB_MAX_SIZE is 4M. All objects returned by arena are aligned by SLAB_MAX_SIZE: (ptr & (SLAB_MAX_SIZE - 1)) is always 0. SLAB_MAX_SIZE therefore must be a power of 2. Limiting SLAB_MAX_SIZE is important to avoid internal fragmentation. Multiple arenas can exist, an object must be returned to the same arena in which it was allocated.

There is a number of different implementations of slab_arena API:

  • huge_arena: this implementation maps at initialization time a huge region of memory, and then uses this region to produce objects. Can be configured to use shared or private mappings.
  • grow_arena - mmaps() each individual block. Thus can incur fragmentation of the address space, but actually returns objects to the OS on unmap.

Use of instances of slab_arena is thread-safe: multiple threads can use the same arena.

slab_cache

Requires an arena for initialization, which works as a memory source for slab_cache. Returns power-of-two sized slabs, with size-aligned address. Uses a buddy system to deal with memory fragmentation. Is expected to be thread-local.

mempool

A memory pool for objects of the same size. Thread local. Requires a slab cache, which works as a source of memory. Automatically defines the optimal slab size, given the object size. Supports alloc() and free().

region

A typical region allocator. Very cheap allocation, but all memory can be freed at once only. Supports savepoints, i.e. an allocation point to which it can roll back, i.e. free all memory allocated after a savepoint. Uses slab_cache as a memory source.

small

A typical slab allocator. Built as a collection of mempool allocators, each mempool suited for a particular object size. Has stepped pools, i.e. pools for small objects up to 500 bytes, and factored pools, for larger objects. The difference between stepped and factored pools is that object size in stepped pools grows step by step, each next pool serving objects of prev_pool_object_size + 8. In factored pools a growth factor is used, i.e. given a factor of 1.1 and previous pool for objects of size up to 1000, next pool will serve objects in range 1001-1100. Since is based on mempool, uses slab_cache as a memory source.

ibuf

A typical input buffer, which could be seen as a memory allocator as well, which reallocates itself when it gets full. Uses slab_cache as a memory source.

obuf

Another implementation of an output buffer, which, for growth, instead of reallocation, used a collection of buffers, size of each next buffer in a collection twice the size the prevoius one. Uses slab_cache as a memory source.

matras

This is the best one. Memory Address Translating allocator. Only allows to allocate objects of size which is a power of two. Provides a 32-bit id for each allocated object. Supports multi-versioning for all allocated objects, i.e. it's possible to create a consistent read view of all allocated memory.

Uses slab_cache as a memory source.

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].