Lines Matching refs:allocate
141 void *(CJSON_CDECL *allocate)(size_t size);
179 copy = (unsigned char *)hooks->allocate(length); in cJSON_strdup()
190 global_hooks.allocate = malloc; in cJSON_InitHooks()
196 global_hooks.allocate = malloc; in cJSON_InitHooks()
197 if (hooks->malloc_fn != NULL) global_hooks.allocate = hooks->malloc_fn; in cJSON_InitHooks()
204 …if ((global_hooks.allocate == malloc) && (global_hooks.deallocate == free)) global_hooks.reallocat… in cJSON_InitHooks()
210 cJSON *node = (cJSON *)hooks->allocate(sizeof(cJSON)); in cJSON_New_Item()
409 newbuffer = (unsigned char *)p->hooks.allocate(newsize); in ensure()
654 … output = (unsigned char *)input_buffer->hooks.allocate(allocation_length + sizeof("")); in parse_string()
960 buffer->buffer = (unsigned char *)hooks->allocate(default_buffer_size); in print()
977 printed = (unsigned char *)hooks->allocate(buffer->offset + 1); in print()
1015 p.buffer = (unsigned char *)global_hooks.allocate((size_t)prebuffer); in cJSON_PrintBuffered()
2375 return global_hooks.allocate(size); in cJSON_malloc()