22 dépôts
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 est un allocateur de mémoire C++ haute performance et une bibliothèque d'exécution conçue pour gérer la mémoire tas (heap) pour les services à grande échelle. Il fonctionne comme un allocateur de mémoire avec mise en cache par thread qui réduit la contention de verrouillage dans les applications multithreadées pour maintenir la stabilité et les performances lors de charges de travail concurrentes. Le projet se concentre sur l'allocation de mémoire à haute concurrence et la mise à l'échelle des applications multithreadées. Il emploie une stratégie consistant à fournir des caches par thread pour assurer un accès rapide à la mémoire et améliorer le débit des programmes parallèles dans les environnements de programmation système de bas niveau. La bibliothèque gère la mémoire via une allocation au niveau des pages, un binning par classe de taille et des métadonnées basées sur des étendues (spans) pour minimiser la fragmentation. Elle utilise une liste libre centrale et des chemins rapides sans verrouillage pour gérer les demandes de mémoire à travers plusieurs threads d'exécution.
Fast, multi-threaded malloc implementation.
Ce projet est une traduction chinoise d'un guide complet sur le langage de programmation Go. Il sert de ressource éducative localisée et de manuel technique conçu pour fournir des conseils sur la syntaxe, la conception et le développement logiciel. La ressource couvre un large éventail d'enseignements sur le langage Go, y compris l'implémentation de modèles de programmation et la conception système. Elle inclut des leçons traduites et des exemples axés sur les fonctionnalités fondamentales du langage telles que la concurrence et l'utilisation des interfaces. Le contenu couvre divers domaines, notamment les fondamentaux du langage, la modélisation de données, la réflexion au runtime et la gestion de la mémoire. Il fournit également une couverture détaillée de l'architecture logicielle, de la gestion des erreurs, de l'assurance qualité et du réseau web. La documentation est structurée comme un manuel technique comprenant du contenu traduit, des errata et des corrections pour garantir un apprentissage précis.
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 is a Go library implementing the KCP protocol for reliable data transmission over UDP. It provides a stream-based transport layer and an automatic repeat request network protocol to ensure ordered delivery while reducing network tail latency. The project differentiates itself through the use of forward error correction via Reed-Solomon codes to reconstruct lost packets without retransmissions. It also implements secure UDP tunneling by using block ciphers to encrypt both packet headers and payloads. The library includes capabilities for high-throughput networking through batch system
Employs slab-based pre-allocation and buffer recycling to minimize garbage collection overhead during packet processing.
Ce projet est un guide complet de programmation de performance et une référence pour le langage Go, se concentrant sur l'efficacité du runtime et l'optimisation de la mémoire. Il fournit une collection de modèles et de techniques conçus pour augmenter la vitesse d'exécution en réduisant la surcharge du garbage collector et en optimisant l'utilisation de la mémoire. La ressource se distingue par des implémentations de référence détaillées pour l'optimisation mémoire, telles que l'analyse d'échappement (escape analysis), le pooling d'objets et l'alignement mémoire des structures. Elle propose des stratégies spécifiques pour réduire la taille des binaires et améliorer l'efficacité du cache CPU grâce à l'optimisation de la disposition mémoire des structures et à l'utilisation de placeholders sans allocation. Le projet couvre un large éventail de capacités d'ingénierie backend, incluant la gestion de la concurrence avec des pools de workers et des primitives de synchronisation, le routage RPC et HTTP haute performance, et des stratégies de mise en cache distribuée. Il inclut également des conseils sur l'observabilité via le profilage CPU et mémoire, ainsi que des modèles d'assurance qualité pour les tests unitaires fonctionnels et la génération d'objets mock. Le contenu est structuré comme une série de tutoriels, d'exemples architecturaux et de guides de benchmarking pour aider les développeurs à analyser et corriger les goulots d'étranglement de performance.
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.