zf_malloc.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /**
  2. *****************************************************************************
  3. * @file zf_malloc.h
  4. * @author Zorb
  5. * @version V1.0.0
  6. * @date 2018-06-28
  7. * @brief 内存管理的头文件
  8. *****************************************************************************
  9. * @history
  10. *
  11. * 1. Date:2018-06-28
  12. * Author:Zorb
  13. * Modification:建立文件
  14. *
  15. *****************************************************************************
  16. */
  17. #ifndef __ZF_MALLOC_H__
  18. #define __ZF_MALLOC_H__
  19. #ifdef __cplusplus
  20. extern "C" {
  21. #endif
  22. #include "stdlib.h"
  23. #include "string.h"
  24. #define _ZF_MALLOC /* 定义内存管理功能 */
  25. #ifdef _ZF_MALLOC
  26. /* 分配函数 */
  27. #define ZF_MALLOC(size_) malloc(size_)
  28. /* 释放函数 */
  29. #define ZF_FREE(ptr_) free(ptr_)
  30. /* 拷贝函数 */
  31. #define ZF_MEMCPY(des_, src_, len_) memcpy(des_, src_, len_)
  32. #endif /* _ZF_MALLOC */
  33. #ifdef __cplusplus
  34. }
  35. #endif
  36. #endif /* __ZF_MALLOC_H__ */
  37. /******************************** END OF FILE ********************************/