lib_memory.h 869 B

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * lib_memory.h
  3. *
  4. * Copyright 2014-2021 Michael Zillgith
  5. *
  6. * This file is part of Platform Abstraction Layer (libpal)
  7. * for libiec61850, libmms, and lib60870.
  8. */
  9. #ifndef MEMORY_H_
  10. #define MEMORY_H_
  11. #include "hal_base.h"
  12. #include "malloc.h"
  13. #define CALLOC(nmemb, size) mycalloc(nmemb, size)
  14. #define MALLOC(size) mymalloc(SRAMEX,size)
  15. #define REALLOC(oldptr, size) myrealloc(SRAMEX,oldptr, size)
  16. #define FREEMEM(ptr) myfree(SRAMEX,ptr)
  17. #define GLOBAL_CALLOC(nmemb, size) mycalloc(nmemb, size)
  18. #define GLOBAL_MALLOC(size) mymalloc(SRAMEX,size)
  19. #define GLOBAL_REALLOC(oldptr, size) myrealloc(SRAMEX,oldptr, size)
  20. #define GLOBAL_FREEMEM(ptr) myfree(SRAMEX,ptr)
  21. #define IEC60870_5_104_MAX_ASDU_LENGTH 249
  22. #define IEC60870_5_104_APCI_LENGTH 6
  23. #define UNUSED_PARAMETER(x) (void)(x)
  24. #endif /* MEMORY_H_ */