MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / py_facts_owned_range

Function py_facts_owned_range

tests/test_extraction.c:11736–11747  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11734}
11735
11736static bool py_facts_owned_range(const CBMArena *arena, const void *ptr, size_t bytes) {
11737 if (!ptr)
11738 return bytes == 0;
11739 uintptr_t address = (uintptr_t)ptr;
11740 for (int i = 0; i < arena->nblocks; i++) {
11741 uintptr_t start = (uintptr_t)arena->blocks[i];
11742 size_t size = arena->block_sizes[i];
11743 if (address >= start && bytes <= size && address - start <= size - bytes)
11744 return true;
11745 }
11746 return false;
11747}
11748
11749static bool py_facts_owned_string(const CBMArena *arena, const char *str) {
11750 return !str || (py_facts_owned_range(arena, str, 1) &&

Callers 2

py_facts_owned_stringFunction · 0.85
py_facts_ownedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected