26 个仓库
针对各种系统的内存管理和分配策略实现。
Explore 26 awesome GitHub repositories matching part of an awesome list · 内存分配器. Refine with filters or upvote what's useful.
This project is a comprehensive technical interview preparation resource and computer science interview guide. It serves as an educational reference for developers to study core software engineering fundamentals and common coding patterns required for employment screenings. The repository provides detailed guides and references covering data structures and algorithms, networking and security, operating systems, and web development. It specifically focuses on the implementation and complexity analysis of sorting, searching, and graph algorithms. The material encompasses a wide breadth of comp
Details the allocation of main memory using continuous and non-continuous methods, including paging.
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
Implements a high-performance general purpose memory allocator designed for execution speed and reduced fragmentation.
This project is a technical reference and documentation suite focused on the internal architecture and operational principles of the Java Virtual Machine. It provides comprehensive guides and analysis on how the virtual machine manages class loading, memory organization, and bytecode execution. The documentation distinguishes itself by providing deep dives into specific runtime mechanisms, such as the binary decoding of class files, the hierarchical delegation model for class loaders, and the precise sequence of the loading, linking, and initialization lifecycle. It also details memory reclam
Describes how the virtual machine organizes memory allocation to manage the lifecycles of objects and classes.
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
Implements a general-purpose memory allocation library emphasizing fragmentation avoidance and scalable concurrency.
LMCache is a distributed key-value cache manager and tiering system designed to accelerate large language model inference. It functions as a tiered storage layer that offloads tensors from GPU memory to CPU RAM, local disks, or remote object stores, enabling the reuse of cached prefixes across different inference sessions and serving engines. The system differentiates itself through a disaggregated prefill-decode model, which separates prompt processing from token generation by transferring caches between distributed compute nodes. It utilizes peer-to-peer orchestration to share and retrieve
Employs a lazy allocation strategy to gradually expand memory usage and reduce initial startup footprint.
996.Leave is an open-source, community-maintained guide that helps tech workers compare work conditions, salaries, cost of living, and legal protections across different countries to inform international relocation decisions. The project stores each country's information as a Markdown file, which is rendered into a pre-built HTML page through static site generation, making the content fast to load and simple to host. The guide provides structured comparisons across a wide range of factors that matter to tech professionals considering a move abroad. These include annual leave entitlements, tax
Advises that recruitment agencies and referrals are most effective in New Zealand and offers personal contact.
RediSearch is a Redis module that adds secondary indexing, full-text search, aggregation, and vector similarity search directly into the in-memory data store. It operates as an in-process search engine, extending the core key-value store with capabilities for indexing hash and JSON documents, enabling fast field-level lookups beyond primary key access. The module provides a full-text search engine built on inverted indexes, supporting stemming, fuzzy matching, and relevance scoring via tf-idf. It also includes a vector similarity search engine using a Hierarchical Navigable Small World graph
Allocates module memory using Redis's own allocator so allocations are tracked and obey maxmemory policies.
Defines allocation semantics with provenance tracking to enforce that pointers only access their originating allocation.
Torchtune is a PyTorch-native library for fine-tuning, aligning, and quantizing large language models. It provides a configurable training pipeline orchestrated through YAML recipes, with CLI overrides and component swapping, distributed training via FSDP2, memory optimizations, and parameter-efficient fine-tuning methods like LoRA, DoRA, and QLoRA. The library distinguishes itself through its YAML-driven configuration system that defines all training parameters and instantiates components from config files, with full CLI override capability for any field or component at launch time. It suppo
Binds worker processes to CPUs near their assigned GPUs on NUMA systems to improve memory access performance.
Torchtune is a PyTorch-native library for fine-tuning, aligning, and quantizing large language models. It provides a config-driven system for instantiating components, orchestrating distributed training, and managing parameter-efficient fine-tuning with quantization support, all through YAML-based configurations and command-line overrides. The library distinguishes itself through its comprehensive post-training workflow orchestration, combining supervised fine-tuning, preference optimization (DPO, PPO, GRPO), knowledge distillation, and quantization-aware training in a single configurable pip
Pins worker processes to CPUs near their assigned GPUs on NUMA systems to reduce memory access latency.
InterviewGuide is a comprehensive technical interview preparation platform that covers the full spectrum of software engineering recruitment, from foundational computer science concepts through to offer negotiation. It provides structured learning paths across algorithms, operating systems, databases, networking, and programming languages, with a particular emphasis on C++ and Go. The platform aggregates real interview experiences and company-specific questions from major tech employers, offering candidates a searchable database of past written exam problems and detailed accounts of actual int
Explains that freed memory is held in a freelist by ptmalloc for future allocations, reducing system calls.
Carp is a statically typed Lisp compiler that compiles Lisp-like syntax directly to C source code, enabling seamless integration with existing C libraries and low-level system programming. It manages memory deterministically at compile time using ownership tracking and linear types, eliminating garbage collection pauses and runtime overhead while ensuring type safety through an inferred static type system. The language distinguishes itself through compile-time macro expansion and metaprogramming capabilities, allowing code generation and transformation before final binary output. It enforces
Records every memory allocation call made inside a block of code during execution.
This is an open-source, crowd-sourced wiki textbook that teaches Linux system programming in C. It covers the core operating system concepts of process management through the fork-exec-wait model, dynamic memory allocation using implicit free list heap allocators, inode-based file systems, inter-process communication via pipes and shared memory, POSIX threads with synchronization primitives, signal-based asynchronous notification, virtual memory with page table translation, and runtime diagnostics using Valgrind and GDB. The textbook distinguishes itself by providing practical, implementation
Provides detailed guides on implementing implicit free list heap allocators.
Highway 是一个便携式 C++ 库和硬件抽象层,专为编写单指令多数据(SIMD)代码而设计。它提供了一个统一接口,将数据并行逻辑映射到各种 CPU 指令集,从而能够开发出在不同处理器架构上运行的高性能软件,而无需特定于架构的汇编代码。 该项目具有动态指令调度器,可根据检测到的硬件在运行时选择最高效的 CPU 指令集。它还支持静态目标专用化,以及用于添加新硬件目标或自定义 SIMD 操作的可扩展机制。 该库涵盖了广泛的向量操作,包括元素级算术、通道归约、混洗和掩码条件执行。它包括一个向量化数学库、用于对齐分配和掩码加载/存储操作的内存管理器,以及用于硬件加速加密的原语。 提供了用于跨多种处理器架构自动编译和验证硬件加速指令的工具。
Includes a memory manager for aligned allocation and masked load-store operations to optimize vector processing.
Luau is a high-performance programming language evolved from Lua 5.1. It consists of a bytecode virtual machine, an embeddable scripting engine, and a static code analyzer designed to provide a secure, sandboxed execution environment for host applications. The project is distinguished by its gradual typing system, which combines automatic type inference with optional manual annotations to detect bugs without requiring full static typing. It also features native vector mathematics for high-performance operations and a specialized debugging system that uses bytecode patching to minimize executi
Employs a domain-specific pool allocator tuned for scripting workloads to outperform general-purpose memory allocators.
Perfetto is a platform for system-level performance tracing and analysis on Linux and Android. It combines a high-throughput trace recorder, a SQL-based query engine, and a browser-based visualizer into a single toolchain. The platform covers CPU scheduling and call-stack profiling, native and Java heap memory allocation tracking, GPU and graphics events, and system-wide counters such as CPU frequency and power consumption. The architecture decouples trace recording from offline analysis, using a compact protobuf format for event encoding and columnar storage for efficient SQL queries. The we
Ships a configurable Poisson-sampling allocator that records every malloc call to reduce overhead while capturing large allocations.
Tcmalloc 是一个高性能 C++ 内存分配器和运行时库,专为管理大规模服务的堆内存而设计。它作为一个线程缓存内存分配器,减少了多线程应用中的锁竞争,从而在并发工作负载下保持稳定性和性能。 该项目专注于高并发内存分配和多线程应用扩展。它采用提供线程本地缓存的策略,以确保快速的内存访问,并提高并行程序在底层系统编程环境中的吞吐量。 该库通过页级分配、大小类分箱(size-classed binning)和基于跨度(span-based)的元数据来管理内存,以最大限度地减少碎片。它利用中央空闲列表和无锁快速路径来处理跨多个执行线程的内存请求。
Employs a tiered caching strategy with thread-local, central, and global page heaps to reduce allocation overhead.
Magnum 是一个用于跨平台图形开发与实时数据可视化的 C++ 中间件套件。它提供了一个硬件无关的渲染层,将图形命令转换为特定平台的调用,确保在不同 GPU 驱动程序与 API(如 Vulkan)间的一致行为。 该项目专注于通过抽象图形与系统实用程序将应用逻辑与底层硬件解耦。它具备用于 3D 资产与音频的插件式资源导入器、用于空间变换的层级场景图,以及用于通信的高性能基于信号的事件系统。 广泛的能力包括线性代数与向量数学、网格几何处理以及 GPU 上下文管理。该工具包还涵盖了空间音频播放、VR 硬件集成以及诸如跨步布局与对齐分配等底层内存优化。 该库可以作为 CMake 子项目集成到父项目中。
Aligns memory blocks to specific boundaries to optimize SIMD and vector instruction performance.
c3c is the compiler for the C3 programming language, transforming source code into executable binaries, static libraries, or dynamic libraries using an LLVM backend. It implements a system based on result-based error handling, scoped memory pooling, and a semantic macro system. The compiler provides first-class support for hardware-backed SIMD vectors that map directly to processor instructions and enables runtime polymorphism through interface-based dynamic dispatch. The project covers a broad set of low-level capabilities, including manual and pooled memory management, inline assembly inte
Implements general memory allocation for arrays and lists using either the heap or temporary pools.
This repository is a comprehensive collection of fully worked solutions to exercises and problems from the standard algorithms textbook by Cormen, Leiserson, Rivest, and Stein (CLRS). It serves as an educational reference for algorithm design and analysis, providing step-by-step reasoning, pseudocode, and mathematical proofs for a wide range of topics. The content spans core computer science areas: algorithm analysis with asymptotic notation, recurrence solving, and amortized cost analysis; data structure implementation and operations for binary search trees, red-black trees, B-trees, Fibonac
Implements allocation and deallocation of array objects from a stack-like free list for reuse.