MCPcopy Create free account
hub / github.com/Tencent/rapidjson / Malloc

Function Malloc

include/rapidjson/allocators.h:65–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63public:
64 static const bool kNeedFree = true;
65 void* Malloc(size_t size) {
66 if (size) // behavior of malloc(0) is implementation defined.
67 return std::malloc(size);
68 else
69 return NULL; // standardize to returning NULL.
70 }
71 void* Realloc(void* originalPtr, size_t originalSize, size_t newSize) {
72 (void)originalSize;
73 if (newSize == 0) {

Callers 1

ReallocMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected