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

Function cbm_sqlite_malloc

internal/cbm/cbm.c:754–762  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

752#endif
753
754static void *cbm_sqlite_malloc(int n) {
755 mi_heap_t *heap = sqlite_heap();
756 void *block = heap ? mi_heap_malloc(heap, (size_t)n) : mi_malloc((size_t)n);
757 if (block) {
758 cbm_mem_class_add_external(CBM_MEM_CLASS_STORE, mi_usable_size(block));
759 }
760 BOUND_ALLOC(block, (size_t)n, 0);
761 return block;
762}
763static void cbm_sqlite_free(void *p) {
764 if (p) {
765 cbm_mem_class_remove_external(CBM_MEM_CLASS_STORE, mi_usable_size(p));

Callers

nothing calls this directly

Calls 2

sqlite_heapFunction · 0.85

Tested by

no test coverage detected