How iliyas-amine/c-mmap-graph works
This is a C library for storing and querying a graph in a fixed-size, memory-mapped file. A caller opens a graph to obtain a handle, then uses the public API to manage node data and edges or query neighbors; the API delegates persistence and graph operations to internal modules. The graph core defines the on-disk layout and allocators. The README is empty, so capabilities and relationships here are based on the provided headers and source excerpts; unsampled behavior is not inferred.
Main entry points: api.c Graph API · graph_core.c Graph layout · file_mapper.c File mapping · graph_ops.c Node data operations
Components 9
Public API
- Graph API
src/api.c
File Persistence
- File mapping
src/file_mapper.c - Mapped graph file
Graph Engine
- Graph layout
src/graph_core.c - Slot and node allocators
src/graph_core.c - Node data operations
src/graph_ops.c - Edge operations
src/graph_ops.c - Neighbor queries
src/graph_ops.c
Other components
- Library caller
Connections 14
- Library caller → Graph API: calls
- Graph API → File mapping: opens, syncs, closes
src/api.c - File mapping → Mapped graph file: maps file
src/file_mapper.c - File mapping → Graph layout: initializes layout
src/file_mapper.c - Graph API → Graph layout: loads graph
src/api.c - Graph API → Slot and node allocators: allocates nodes
src/api.c - Graph API → Node data operations: reads and writes data
src/api.c - Graph API → Edge operations: adds and removes edges
src/api.c - Graph API → Neighbor queries: queries neighbors
src/api.c - Node data operations → Graph layout: loads graph
src/graph_ops.c - Edge operations → Graph layout: loads graph
src/graph_ops.c - Neighbor queries → Graph layout: loads graph
src/graph_ops.c - Graph layout → Mapped graph file: defines mapped structures
src/graph_core.c - Slot and node allocators → Graph layout: updates graph state
src/graph_core.c