MCPcopy Create free account
hub / github.com/ElementsProject/elements / RPCMallocInfo

Function RPCMallocInfo

src/rpc/misc.cpp:548–563  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

546
547#ifdef HAVE_MALLOC_INFO
548static std::string RPCMallocInfo()
549{
550 char *ptr = nullptr;
551 size_t size = 0;
552 FILE *f = open_memstream(&ptr, &size);
553 if (f) {
554 malloc_info(0, f);
555 fclose(f);
556 if (ptr) {
557 std::string rv(ptr, size);
558 free(ptr);
559 return rv;
560 }
561 }
562 return "";
563}
564#endif
565
566static RPCHelpMan getmemoryinfo()

Callers 1

getmemoryinfoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected