nuttx-apps/include/testing/unity_fixture_malloc_overrides.h
2017-03-31 09:10:56 -06:00

27 lines
873 B
C

//- Copyright (c) 2010 James Grenning and Contributed to Unity Project
/* ==========================================
Unity Project - A Test Framework for C
Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams
[Released under MIT License. Please refer to license.txt for details]
========================================== */
#ifndef UNITY_FIXTURE_MALLOC_OVERRIDES_H_
#define UNITY_FIXTURE_MALLOC_OVERRIDES_H_
#ifndef UNITY_DISABLE_MEMORY_LEAK_TRACKING
#include <sys/types.h>
#define malloc unity_malloc
#define calloc unity_calloc
#define realloc unity_realloc
#define free unity_free
void* unity_malloc(size_t size);
void* unity_calloc(size_t num, size_t size);
void* unity_realloc(void * oldMem, size_t size);
void unity_free(void * mem);
#endif /* UNITY_DISABLE_MEMORY_LEAK_TRACKING */
#endif /* UNITY_FIXTURE_MALLOC_OVERRIDES_H_ */