ralloc - An alternative pure-Rust memory allocator.

  •        54

A fast & memory efficient userspace allocator. This allocator is used as the default Redox.




Related Projects

redox - Redox: A Rust Operating System

  •    Shell

Redox is an operating system written in Rust, a language with focus on safety and high performance. Redox, following the microkernel design, aims to be secure, usable, and free. Redox is inspired by previous kernels and operating systems, such as SeL4, MINIX, Plan 9, and BSD. Redox is not just a kernel, it's a full-featured Operating System, providing packages (memory allocator, file system, display manager, core utilities, etc.) that together make up a functional and convenient operating system. You can loosely think of it as the GNU or BSD ecosystem, but in a memory safe language and with modern technology. See this list for overview of the ecosystem.

memory-allocators - Custom memory allocators in C++ to improve the performance of dynamic memory allocation

  •    C++

When applications need more memory this can be allocated in the heap (rather than in the stack) in runtime. This memory is called 'dynamic memory' because it can't be known at compile time and its need changes during the execution. Our programs can ask for dynamic memory usin 'malloc'. Malloc returns an address to a position in memory where we can store our data. Once we're done with that data, we can call 'free' to free the memory and let others processes use it. For this project I've implemented different ways to manage by ourselves dynamic memory in C++.This means that instead of using native calls like 'malloc' or 'free' we're going to use a custom memory allocator that will do this for us but in a more efficient way. The goal, then, is to understand how the most common allocators work, what they offer and compare them to see which one performs better.

jemalloc - Scalable, Concurrent, Malloc Implementation

  •    C

jemalloc is a general purpose malloc(3) implementation that emphasizes fragmentation avoidance and scalable concurrency support. It is intended for use as the system-provided memory allocator, as in FreeBSD's libc library, as well as for linking into C/C++ applications. jemalloc provides many introspection, memory management, and tuning features beyond the standard allocator functionality.

Mesh - A memory allocator that automatically reduces the memory footprint of C/C++ applications.

  •    C++

Mesh is a drop in replacement for malloc(3) that compacts the heap without rewriting application pointers. Mesh is described in an academic paper (arxiv PDF) that will appear at PLDI 2019.

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

  •    C++

The C++ STL allocator model has various flaws. For example, they are fixed to a certain type, because they are almost necessarily required to be templates. So you can't easily share a single allocator for multiple types. In addition, you can only get a copy from the containers and not the original allocator object. At least with C++11 they are allowed to be stateful and so can be made object not instance based. But still, the model has many flaws. Over the course of the years many solutions have been proposed. for example EASTL. This library is another. But instead of trying to change the STL, it works with the current implementation. See example/ for more.

scalloc - A Fast, Multicore-Scalable, Low-Fragmentation Memory Allocator

  •    C++

scalloc provides general-purpose memory allocation involving many threads on many cores can be done with high performance, multicore scalability, and low memory consumption. The main ideas behind the design of scalloc are: uniform treatment of small and big objects through so-called virtual spans, efficiently and effectively reclaiming free memory through fast and scalable global data structures.

relibc - C Library in Rust for Redox and Linux (WIP)

  •    Rust

relibc is a portable POSIX C standard library written in Rust. It is under heavy development, and currently supports Redox and Linux. The motivation for this project is twofold: Reduce issues the redox crew was having with newlib, and create a safer alternative to a C standard library written in C. It is mainly designed to be used under redox, as an alternative to newlib, but it also supports linux syscalls via the sc crate.

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

  •    C

The code should be easily portable to any platform with atomic operations and an mmap-style virtual memory management API. The API used to map/unmap memory pages can be configured in runtime to a custom implementation and mapping granularity/size. This library is put in the public domain; you can redistribute it and/or modify it without any restrictions. Or, if you choose, you can use it under the MIT license.

redox - Modern, asynchronous, and wicked fast C++11 client for Redis

  •    C++

Redox is a C++ interface to the Redis key-value store that makes it easy to write applications that are both elegant and high-performance. Communication should be a means to an end, not something we spend a lot of time worrying about. Redox takes care of the details so you can move on to the interesting part of your project.Redox is built on top of hiredis and libev. It uses only the asynchronous API of hiredis, even for synchronous commands. There is no dependency on Boost or any other libraries.

tfs - Next Generation File System

  •    Rust

TFS is a modular, fast, and feature rich next-gen file system, employing modern techniques for high performance, high space efficiency, and high scalability. TFS was created out of the need for a modern file system for Redox OS, as a replacement for ZFS, which proved to be slow to implement because of its monolithic design.


  •    C++

A Pooled, Shared Memory allocator for the C++ Standard Template Library (STL). Allows processes to share an STL container class to facilitate control and communications between the connected processes.

kernel - The Redox microkernel

  •    Rust

Running qemu with the -s flag will set up qemu to listen on port 1234 for a gdb client to connect to it. To debug the redox kernel run. This will start a VM with and listen on port 1234 for a gdb or lldb client.

Shared Memory Arena

  •    C

a shared memory allocator that provides a simple interface for named shared memory segments; shared memory between any processes; provides shared memory queues; does not use the same address between processes; fast structured arena file scales well

malloc pool

  •    C++

This was my first attempt at a persistent (disk-based) allocator, but I aimed too high, used too many obscure C++ features and it got away from me. You will need the version of v3c mentioned in configure.ac.in to build it. Like I said, it contains lots of really obscure C++, if you're curious. This project isn't being actively maintained anymore - see it's way-cooler C/C++ replacement here at SourceForge - treedb.


  •    C

Moved to http://labs.omniti.com/trac/portableumem/ A port of the Solaris libumem memory allocator to other platforms. It provides runtime creation of slabs with per-cpu caching to reduce cpu contention during memory allocation.

DieHard - DieHard: An error-resistant memory allocator for Windows, Linux, and Mac OS X

  •    C

This distribution includes the source for three systems. DieHard was the direct inspiration for the Fault-Tolerant Heap incorporated in Windows 7, though it goes far beyond it in terms of reliability.

gorelic - New Relic agent for Go lang

  •    Go

New Relic agent for Go runtime. It collect a lot of metrics about scheduler, garbage collector and memory allocator and send them to NewRelic.You have to install manually only first two dependencies. All other dependencies will be installed automatically by Go toolchain.

mesalink - MesaLink is a memory-safe and OpenSSL-compatible TLS library.

  •    Rust

MesaLink is a memory-safe and OpenSSL-compatible TLS library. Since 2014, the industry has seen a huge impact and loss due to memory vulnerabilities in TLS stacks; such as the infamous "Heartbleed" bug. MesaLink is born with the goal of eradicating memory vulnerabilities in TLS stacks; and it is written in Rust, a programming language that guarantees memory safety. This significantly reduces the attack surfaces; which further facilitates auditing and restricting the remaining attack surfaces. MesaLink is cross-platform and provides OpenSSL-compatible APIs. It works seamlessly in desktop, mobile, and IoT devices. With the growth of the ecosystem, MesaLink would also be adopted in the server environment in the future. To get better functionality along with strong security guarantees, MesaLink follows the following rules-of-thumb for hybrid memory-safe architecture designing proposed by the Rust SGX SDK project.

termion - A bindless library for controlling terminals/TTY.

  •    Rust

Termion is a pure Rust, bindless library for low-level handling, manipulating and reading information about terminals. This provides a full-featured alternative to Termbox. Termion aims to be simple and yet expressive. It is bindless, meaning that it is not a front-end to some other library (e.g., ncurses or termbox), but a standalone library directly talking to the TTY.

ion - The Ion Shell. Compatible with Redox and Linux.

  •    Rust

Ion is a modern system shell that features a simple, yet powerful, syntax. It is written entirely in Rust, which greatly increases the overall quality and security of the shell. It also offers a level of performance that exceeds that of Dash, when taking advantage of Ion's features. While it is developed alongside, and primarily for, RedoxOS, it is a fully capable on other *nix platforms. Ion is still a WIP, and both its syntax and rules are subject to change over time. It is still quite a ways from becoming stabilized, but we are getting very close. Changes to the syntax at this time are likely to be minimal.