MCPcopy Create free account
hub / github.com/ashvardanian/less_slow.cpp / yyjson_wrap_malloc

Function yyjson_wrap_malloc

less_slow.cpp:5013–5020  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5011}
5012
5013yyjson_alc yyjson_wrap_malloc(arena_t &) noexcept {
5014 yyjson_alc alc;
5015 alc.ctx = NULL;
5016 alc.malloc = +[](void *, size_t size) noexcept -> void * { return malloc(size); };
5017 alc.realloc = +[](void *, void *ptr, size_t, size_t size) noexcept -> void * { return realloc(ptr, size); };
5018 alc.free = +[](void *, void *ptr) noexcept -> void { free(ptr); };
5019 return alc;
5020}
5021
5022typedef yyjson_alc (*yyjson_alc_wrapper)(arena_t &);
5023

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected