Lines Matching refs:cJSON_malloc
42 static void *(*cJSON_malloc)(size_t sz) = malloc; variable
50 if (!(copy = (char *)cJSON_malloc(len))) in cJSON_strdup()
58 cJSON_malloc = malloc; in cJSON_InitHooks()
63 cJSON_malloc = (hooks->malloc_fn) ? hooks->malloc_fn : malloc; in cJSON_InitHooks()
69 cJSON *node = (cJSON *)cJSON_malloc(sizeof(cJSON)); in cJSON_New_Item()
159 newbuffer = (char *)cJSON_malloc(newsize); in ensure()
189 str = (char *)cJSON_malloc(2); /* special case for 0. */ in print_number()
197 str = (char *)cJSON_malloc( in print_number()
205 str = (char *)cJSON_malloc(64); /* This is a nice tradeoff. */ in print_number()
279 out = (char *)cJSON_malloc( in parse_string()
382 out = (char *)cJSON_malloc(len + 3); in print_string_ptr()
397 out = (char *)cJSON_malloc(3); in print_string_ptr()
415 out = (char *)cJSON_malloc(len + 3); in print_string_ptr()
520 p.buffer = (char *)cJSON_malloc(prebuffer); in cJSON_PrintBuffered()
682 out = (char *)cJSON_malloc(3); in print_array()
721 entries = (char **)cJSON_malloc(numentries * sizeof(char *)); in print_array()
739 out = (char *)cJSON_malloc(len); in print_array()
850 out = (char *)cJSON_malloc(fmt ? depth + 4 : 3); in print_object()
925 entries = (char **)cJSON_malloc(numentries * sizeof(char *)); in print_object()
928 names = (char **)cJSON_malloc(numentries * sizeof(char *)); in print_object()
953 out = (char *)cJSON_malloc(len); in print_object()