| 123456789101112131415161718192021222324 |
- #ifndef _SYTEM_MEMORY_H
- #define _SYTEM_MEMORY_H
- #include <mqx.h>
- #include <bsp.h>
- #include <stdlib.h>
- #define test_object(object) if(object == NULL)return NULL
- #define new_string(str) (char*)malloc(strlen(str)+1)
- #define new_object(object) (object*)malloc(sizeof(object))
- #define reset_object(object,p) memset((void*)p,NULL,sizeof(object))
- extern void *new_byte(int size);
- extern void test_memory(void);
- #endif
|