Home
last modified time | relevance | path

Searched refs:oldMem (Results 1 – 4 of 4) sorted by relevance

/third_party/unity/extras/memory/src/
Dunity_memory.c163 void* unity_realloc(void* oldMem, size_t size) in unity_realloc() argument
165 Guard* guard = (Guard*)oldMem; in unity_realloc()
168 if (oldMem == NULL) return unity_malloc(size); in unity_realloc()
171 if (isOverrun(oldMem)) in unity_realloc()
173 release_memory(oldMem); in unity_realloc()
179 release_memory(oldMem); in unity_realloc()
183 if (guard->size >= size) return oldMem; in unity_realloc()
189 if ((oldMem == unity_heap + heap_index - old_total_size) && in unity_realloc()
192 release_memory(oldMem); /* Not thread-safe, like unity_heap generally */ in unity_realloc()
199 memcpy(newMem, oldMem, guard->size); in unity_realloc()
[all …]
Dunity_memory.h48 void* unity_realloc(void * oldMem, size_t size);
/third_party/cJSON/tests/unity/extras/fixture/src/
Dunity_fixture.c268 void* unity_realloc(void* oldMem, size_t size) in unity_realloc() argument
270 Guard* guard = (Guard*)oldMem; in unity_realloc()
273 if (oldMem == NULL) return unity_malloc(size); in unity_realloc()
276 if (isOverrun(oldMem)) in unity_realloc()
278 release_memory(oldMem); in unity_realloc()
284 release_memory(oldMem); in unity_realloc()
288 if (guard->size >= size) return oldMem; in unity_realloc()
291 if (oldMem == unity_heap + heap_index - guard->size - sizeof(end) && in unity_realloc()
294 release_memory(oldMem); /* Not thread-safe, like unity_heap generally */ in unity_realloc()
300 memcpy(newMem, oldMem, guard->size); in unity_realloc()
[all …]
Dunity_fixture_malloc_overrides.h44 void* unity_realloc(void * oldMem, size_t size);