2 * malloc.h - dynamic memory allocation header
4 * written by Vangelis Rokas, 2004 (vrokas@otenet.gr)
14 * Structure of memory block header:
15 * bit 7 (MSB): allocated flag
16 * bits 0-6: pointer to next block (max length: 126)
27 #define malloc pic16_malloc
28 #define free pic16_free
29 #define realloc pic16_realloc
30 #define calloc pic16_calloc
34 #define MAX_BLOCK_SIZE 0x7f /* 126 bytes */
35 #define MAX_HEAP_SIZE 0x200 /* 512 bytes */
36 #define _MAX_HEAP_SIZE (MAX_HEAP_SIZE-1)
38 #define ALLOC_FLAG 0x80
51 unsigned char *malloc(unsigned char);
52 void free(unsigned char *);
53 unsigned char *calloc(unsigned char num); //, unsigned char len);
54 unsigned char *realloc(unsigned char *mblock, unsigned char len);
57 #endif /* __MALLOC_H__ */