22 Repos
Libraries for managing dynamic memory and garbage collection.
Explore 22 awesome GitHub repositories matching part of an awesome list · Memory Allocation. Refine with filters or upvote what's useful.
This project is a collection of guidelines and best practices for the Go programming language, providing a comprehensive style guide and set of programming standards. It establishes a framework for writing maintainable and performant source code through standardized naming, structuring, and organizational conventions. The guide focuses on specific patterns for concurrency, error handling, and performance optimization. It details methods for managing goroutine lifecycles to prevent race conditions, designing structured error wrapping and routing to maintain observability, and implementing memo
Implements memory allocation strategies such as specifying initial capacities to reduce garbage collection overhead.
Mimalloc is a general purpose dynamic memory allocator for C and C++ designed to increase execution speed and reduce fragmentation. It functions as a scalable heap manager that replaces standard library allocation functions to improve performance and memory efficiency across applications. The project distinguishes itself as both a heap security hardener and a memory corruption detector. It employs randomized allocation, encrypted free lists, and sampled guard pages to mitigate heap exploits and identify buffer overflows or use-after-free errors during runtime. The allocator provides capabili
Compact general purpose allocator with high performance.
jemalloc is a general purpose C memory allocator designed as a replacement for the standard library malloc and free functions. It is a multi-threaded allocation library that emphasizes fragmentation avoidance and scalable concurrency for high-performance applications. The project reduces lock contention by using multiple independent memory arenas and thread-local cache layers. It minimizes latency by offloading the reclamation of unused memory pages to asynchronous background threads and utilizes huge page metadata storage to reduce translation lookaside buffer misses. The system includes a
General purpose malloc with fragmentation avoidance and concurrency support.
xLua is a scripting bridge and C++ wrapper used to embed the Lua language into host applications. It facilitates bidirectional data exchange and function calls between scripts and the host environment. The project includes a runtime patching tool for replacing application logic and fixing bugs without requiring a system restart. It features a coroutine orchestrator that wraps asynchronous operations into linear code and a script validator that verifies digital signatures to ensure code authenticity and integrity before execution. To minimize memory overhead and garbage collection, the system
Supports passing custom structs and enums between the scripting engine and host environment to reduce garbage collection overhead.
This project is a translated Go language style guide and programming standard. It provides a collection of coding standards and best practices designed to ensure that Go code remains maintainable, readable, and efficient. The guide focuses on idiomatic patterns for error handling, interface compliance, and memory optimization. It establishes standards for package naming and the use of functional options to maintain backward compatibility in constructors. It covers a broad range of capabilities, including concurrency management for coordinating process lifecycles and preventing resource leaks
Provides strategies for pre-allocating data collection capacity to minimize runtime overhead and garbage collection pressure.
100 Go Mistakes is a reference book and code review companion that catalogues frequent Go programming anti-patterns and provides corrected implementations for each one. It covers a wide range of common pitfalls, from range loop variable capture and interface nil handling to error wrapping and map iteration randomization, helping developers recognize and avoid these issues in their own code. The project distinguishes itself by offering a structured, example-driven approach to learning idiomatic Go. It covers core design decisions such as when to use pointer versus value receivers, how to apply
Teaches how to initialize slices with explicit length and capacity for performance.
Tcmalloc ist ein High-Performance-C++-Speicherallokator und eine Laufzeitbibliothek zur Verwaltung von Heap-Speicher für großskalige Dienste. Es fungiert als Thread-Caching-Speicherallokator, der Lock-Contention in Multithreaded-Anwendungen reduziert, um Stabilität und Performance bei gleichzeitigen Workloads zu wahren. Das Projekt konzentriert sich auf hochperformante Speicherallokation und die Skalierung von Multithreaded-Anwendungen. Es verwendet eine Strategie mit Per-Thread-Caches, um schnellen Speicherzugriff zu gewährleisten und den Durchsatz paralleler Programme in Low-Level-Systemumgebungen zu verbessern. Die Bibliothek verwaltet Speicher durch Page-Level-Allokation, Size-Classed-Binning und Span-basiertes Metadaten-Management, um Fragmentierung zu minimieren. Sie nutzt eine zentrale Free-List und Lock-free-Fast-Paths, um Speicheranfragen über mehrere Ausführungsthreads hinweg zu verarbeiten.
Fast, multi-threaded malloc implementation.
Dieses Projekt ist eine chinesische Übersetzung eines umfassenden Leitfadens zur Programmiersprache Go. Es dient als lokalisierte Bildungsressource und technisches Handbuch, das Orientierung zu Sprachsyntax, Design und Softwareentwicklung bietet. Die Ressource deckt ein breites Spektrum der Go-Sprachausbildung ab, einschließlich der Implementierung von Programmiermustern und Systemdesign. Sie enthält übersetzte Lektionen und Beispiele, die sich auf Kernfunktionen der Sprache wie Concurrency und die Verwendung von Interfaces konzentrieren. Der Inhalt umfasst verschiedene Kompetenzbereiche, darunter Sprachgrundlagen, Datenmodellierung, Runtime-Reflection und Speicherverwaltung. Zudem bietet es detaillierte Abhandlungen zu Softwarearchitektur, Fehlerbehandlung, Qualitätssicherung und Web-Networking. Die Dokumentation ist als technisches Handbuch strukturiert, das übersetzte Inhalte, Errata und Korrekturen enthält, um ein präzises Lernen zu gewährleisten.
Explains how to initialize slices with specific length and capacity for optimal memory allocation.
ZLinq is a zero-allocation LINQ library and memory-efficient collection toolkit for C#. It provides a high-performance replacement for standard query operations by using value-type enumerators and pooled memory to eliminate heap allocations and reduce garbage collection overhead. The library features a C# source generator that automatically routes standard query method calls to these zero-allocation implementations. It further accelerates data processing through a SIMD accelerated data library, using hardware vectorization for numeric aggregations and bulk operations on primitive arrays and s
Reduces garbage collection frequency and overhead by performing data queries without heap memory allocation.
kcp-go ist eine Go-Bibliothek, die das KCP-Protokoll für eine zuverlässige Datenübertragung über UDP implementiert. Sie bietet eine Stream-basierte Transportschicht und ein automatisches Wiederholungsanforderungs-Netzwerkprotokoll, um eine geordnete Zustellung bei gleichzeitiger Reduzierung der Netzwerk-Tail-Latenz sicherzustellen. Das Projekt zeichnet sich durch den Einsatz von Forward Error Correction mittels Reed-Solomon-Codes aus, um verlorene Pakete ohne Neuübertragungen zu rekonstruieren. Es implementiert zudem sicheres UDP-Tunneling durch die Verwendung von Blockchiffren zur Verschlüsselung von Paket-Headern und Payloads. Die Bibliothek enthält Funktionen für High-Throughput-Networking durch Batch-System-Call-Verarbeitung und Speicher-Recycling. Sie optimiert die Leistung weiter durch Congestion-Tuning zur Priorisierung der sofortigen Datenwiederherstellung und ein zweistufiges Task-Scheduling-System für die parallele CPU-Verteilung. Die Implementierung enthält Observability-Tools zur Verfolgung von Netzwerkmetriken und zum Tracing von Protokollereignissen.
Employs slab-based pre-allocation and buffer recycling to minimize garbage collection overhead during packet processing.
Dieses Projekt ist ein umfassender Leitfaden und eine Referenz für Performance-Programmierung in Go, mit Fokus auf Laufzeiteffizienz und Speicheroptimierung. Es bietet eine Sammlung von Patterns und Techniken, die darauf ausgelegt sind, die Ausführungsgeschwindigkeit durch Reduzierung des Garbage-Collection-Overheads und Optimierung der Speichernutzung zu steigern. Die Ressource zeichnet sich durch detaillierte Referenzimplementierungen zur Speicheroptimierung aus, wie etwa Escape-Analyse, Object Pooling und Structure Memory Alignment. Sie bietet spezifische Strategien zur Reduzierung der Binärgröße und zur Verbesserung der CPU-Cache-Effizienz durch Optimierung des Speicherlayouts von Strukturen und die Verwendung von Zero-Allocation-Platzhaltern. Das Projekt deckt ein breites Spektrum an Backend-Engineering-Fähigkeiten ab, einschließlich Concurrency-Management mit Worker Pools und Synchronisations-Primitiven, High-Performance-RPC und HTTP-Routing sowie Strategien für verteiltes Caching. Es enthält zudem Anleitungen zur Observability durch CPU- und Memory-Profiling sowie Quality-Assurance-Patterns für funktionale Unit-Tests und die Generierung von Mock-Objekten. Der Inhalt ist als Serie von Tutorials, Architekturbeispielen und Benchmarking-Leitfäden strukturiert, um Entwicklern bei der Analyse und Behebung von Performance-Engpässen zu helfen.
Provides optimizations for pre-allocating slice capacity to avoid expensive runtime re-allocations and copies.
The Boehm-Demers-Weiser conservative C/C++ Garbage Collector (bdwgc, also known as bdw-gc, boehm-gc, libgc)
Conservative garbage collector for C and C++.
Public domain cross platform lock free thread caching 16-byte aligned memory allocator implemented in C
Cross-platform lock-free thread-caching memory allocator.
Public domain cross platform lock free thread caching 16-byte aligned memory allocator implemented in C
Lock-free thread-caching memory allocator.
Custom memory allocators in C++ to improve the performance of dynamic memory allocation
Custom allocators for improved dynamic memory performance.
A memory allocator that automatically reduces the memory footprint of C/C++ applications.
Allocator that automatically reduces application memory footprint.
Message passing based allocator
Message passing based high-performance allocator.
Smart pointers for the (GNU) C programming language
Smart pointers for the C programming language.
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 memory allocator library.
Two-Level Segregated Fit memory allocator implementation.
Two-Level Segregated Fit dynamic memory allocator.