Lines Matching refs:cJSON_malloc
46 static void *(*cJSON_malloc)(size_t sz) = malloc; variable
55 if (!(copy = (char*)cJSON_malloc(len))) return 0; in cJSON_strdup()
63 cJSON_malloc = malloc; in cJSON_InitHooks()
68 cJSON_malloc = (hooks->malloc_fn)?hooks->malloc_fn:malloc; in cJSON_InitHooks()
75 cJSON* node = (cJSON*)cJSON_malloc(sizeof(cJSON)); in cJSON_New_Item()
124 str=(char*)cJSON_malloc(21); /* 2^64+1 can be represented in 21 chars. */ in print_number()
129 str=(char*)cJSON_malloc(64); /* This is a nice tradeoff. */ in print_number()
162 out=(char*)cJSON_malloc(len+1); /* This is how long we need for the string, roughly. */ in parse_string()
222 out=(char*)cJSON_malloc(len+3); in print_string_ptr()
360 out=(char*)cJSON_malloc(3); in print_array()
365 entries=(char**)cJSON_malloc(numentries*sizeof(char*)); in print_array()
379 if (!fail) out=(char*)cJSON_malloc(len); in print_array()
453 out=(char*)cJSON_malloc(fmt?depth+4:3); in print_object()
461 entries=(char**)cJSON_malloc(numentries*sizeof(char*)); in print_object()
463 names=(char**)cJSON_malloc(numentries*sizeof(char*)); in print_object()
479 if (!fail) out=(char*)cJSON_malloc(len); in print_object()