custom-allocators

custom-allocators is a skill for Codex from OutlineDriven/outline-driven-development. It costs 39 tokens per session (1,954 once invoked), scanned A, original, Apache-2.0.

Guidance for designing and tuning memory allocators, the components that give programs memory and later take it back. It covers pools, slabs, arenas, Rust's global allocator interface, and common allocator libraries.

In plain words
What is it for?
Use it to implement C or Rust allocators, tune jemalloc, mimalloc, or tcmalloc, and plan allocator benchmarks.
Why use it?
It helps match memory allocation to object sizes, lifetimes, and threading so you can investigate fragmentation, memory growth, contention, or latency.

Skill for Codex

Written for Codex: agents/openai.yaml present.

Good fit Use it to implement C or Rust allocators, tune jemalloc, mimalloc, or tcmalloc, and plan allocator benchmarks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/outlinedriven/outline-driven-development/custom-allocators
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add OutlineDriven/outline-driven-development --skill custom-allocators
Clone the repo
git clone --depth 1 https://github.com/OutlineDriven/outline-driven-development

Made for: Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for custom-allocators

README.md
[![agentmods](https://agentmods.dev/badge/skills/outlinedriven/outline-driven-development/custom-allocators/github.svg)](https://agentmods.dev/skills/outlinedriven/outline-driven-development/custom-allocators)
Your own site
<a href="https://agentmods.dev/skills/outlinedriven/outline-driven-development/custom-allocators"><img src="https://agentmods.dev/badge/skills/outlinedriven/outline-driven-development/custom-allocators/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for custom-allocators

Your own site · 80×15
<a href="https://agentmods.dev/skills/outlinedriven/outline-driven-development/custom-allocators"><img src="https://agentmods.dev/badge/skills/outlinedriven/outline-driven-development/custom-allocators.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 39 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,954 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high YARA Match · line 109
    YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).
    Fix: Remove the malware payload or compromised file entirely. Investigate how it entered the skill and audit all other artifacts for additional indicators of compromise.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00039 $0.01954
Opus 5 $0.00019 $0.00977
Sonnet 5 $0.00008 $0.00391
Haiku 4.5 $0.00004 $0.00195

Measured 3d ago against content hash 94cd53ed18fe, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

custom-allocators scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.devin/skills/custom-allocators/SKILL.md · 191 lines

How it starts

The opening of the file, as written. The whole thing — 191 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Custom allocators

Contract

Field Bound contract
Trigger Memory allocator design, tuning, or benchmarking for C, Rust, or systems workloads.
Authority Read-only. No source or remote mutation. Chat output only.
Side effect Emits a structured guidance report to chat.
Done The report names the allocator type, shows a pool or arena implementation, lists jemalloc/mimalloc/tcmalloc tuning options, shows a Rust GlobalAlloc pattern, and gives fragmentation and benchmarking steps.

Inputs

  1. Target language and allocator type (required): C pool/arena, Rust GlobalAlloc, or tuning jemalloc/mimalloc/tcmalloc.
  2. Workload pattern (required): allocation size distribution, object lifetime, thread count, and latency or throughput goal.
  3. Observed symptom (optional): OOM, RSS growth, fragmentation, allocator contention, or unexpected latency.

Procedure

  1. Classify the allocator type. Match the workload to one of the allocator types below. Done when: the type is named.

    Type Best for Allocation Free
    Pool/fixed-size Fixed-size objects with a known maximum count Constant time Constant time
    Slab Size-class caching, kernel-style caches Constant time Constant time
    Arena/bump Request-scoped or frame-scoped allocations Fast pointer bump Bulk reset
    Buddy Power-of-two blocks, large allocations Split and merge by power of two Coalesce
    General jemalloc, mimalloc, tcmalloc Variable time Variable time
  2. Build or review a pool allocator. Use the C example below. Align backing memory to a cache line. Track the block size, block count, and a free list. Done when: the init, alloc, and free paths are shown.

    #include <stddef.h>
    #include <stdint.h>
    #include <stdlib.h>
    
    typedef struct pool_block {
        struct pool_block *next;
    } pool_block_t;
    
    typedef struct {
        void   *memory;
        size_t  block_size;
        size_t  num_blocks;
        pool_block_t *free_list;
    } pool_t;
    
    int pool_init(pool_t *p, size_t block_size, size_t num_blocks) {
        p->block_size = block_size < sizeof(pool_block_t)
            ? sizeof(pool_block_t) : block_size;
        p->num_blocks = num_blocks;
        p->memory = aligned_alloc(64, p->block_size * num_blocks);
        if (!p->memory) return -1;
        p->free_list = NULL;
        for (size_t i = 0; i < num_blocks; i++) {
            pool_block_t *blk = (pool_block_t *)((char *)p->memory
                + i * p->block_size);
            blk->next = p->free_list;
            p->free_list = blk;
        }
        return 0;
    }
    
    void *pool_alloc(pool_t *p) {
        if (!p->free_list) return NULL;
        pool_block_t *blk = p->free_list;
        p->free_list = blk->next;
        return blk;
    }
    
    void pool_free(pool_t *p, void *ptr) {
        pool_block_t *blk = (pool_block_t *)ptr;
        blk->next = p->free_list;
        p->free_list = blk;
    }
    

Read the full file on GitHub · 191 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 191 lines · 39 tokens per session scan A 94cd53ed18fe

Subscribe to this mod's changes

custom-allocators is a skill published in the GitHub repository OutlineDriven/outline-driven-development (52 stars, last pushed 4d ago), licensed Apache-2.0. It adds 39 tokens to every session and 1,954 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-06.

Related

Other skills, from other repositories

memory-safety-patterns

Implement memory-safe programming with RAII, ownership, smart pointers, and resource management across Rust, C++, and C. Use when writing safe systems code, managing resources, or preventing memory bugs.

rmyndharis/antigravity-skills · 45 tokens

memory-safety-patterns

Implement memory-safe programming with RAII, ownership, smart pointers, and resource management across Rust, C++, and C. Use when writing safe systems code, managing resources, or preventing memory bugs.

RudyCity/superagent · 45 tokens

memory-model

C++ and Rust memory model skill for concurrent programming. Use when understanding memory ordering, writing lock-free data structures, using std::atomic or Rust atomics, diagnosing data races, or selecting the correct memory order for atomic operations. Activates on queries about memory ordering, acquire-release…

mohitmishra786/low-level-dev-skills · 83 tokens

webassembly-expert

Create production-ready WebAssembly modules for web and server environments with optimal performance and seamless JavaScript integration. Use when the user mentions WebAssembly or Wasm, WASI, compiling Rust/C/C++ to the browser, Emscripten, wasmtime, or JavaScript-to-Wasm interop for performance-critical code.

personamanagmentlayer/pcl · 69 tokens

rust-formal-verification

Use when Rust code, especially unsafe or panic-critical paths, needs a Kani, Verus, or Creusot harness written, run, and its failure read. Not for choosing the proof policy: use proof-driven.

OutlineDriven/odin-claude-plugin · 51 tokens

libafl

Use when a LibAFL fuzzer needs an executor, observer, feedback, mutator, scheduler, or objective composed around a target. Not for remote, credential, publish, deploy, or irreversible changes.

OutlineDriven/odin-claude-plugin · 46 tokens