Skip to content

Feature request: --max-memory flag for RAM-constrained hosts #580

Description

@darkhipo

On an 8GB M1 Air indexing the MultiAgency codebase (~6000 files), codebase-memory-mcp v0.8.1 consumes 8-11GB RSS. Two concurrent instances pushed the host to swap death with malloc corruption and SIGSEGV.

The knowledge graph is built fully in memory. For large codebases on constrained hardware, this causes:

  • Swap thrash (load averages > 20)
  • malloc(3) failures ("pointer being freed was not allocated")
  • Process crashes from corrupted allocations

Request: a --max-memory=N flag (in MB or GB) that limits the in-memory graph size. When exceeded, spill to disk or use a streaming/paged approach. This would let the binary run on 8GB machines by trading speed for RAM safety.

Workaround: kill and restart periodically. Not sustainable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions