diff -r 6301d1fa7143 -r 4965c485f121 sourcepawn/compiler/sctracker.h --- a/sourcepawn/compiler/sctracker.h Sun Oct 15 20:26:51 2006 +0000 +++ b/sourcepawn/compiler/sctracker.h Sun Oct 15 20:57:14 2006 +0000 @@ -1,26 +1,36 @@ #ifndef _INCLUDE_SOURCEPAWN_COMPILER_TRACKER_H_ #define _INCLUDE_SOURCEPAWN_COMPILER_TRACKER_H_ -#define HEAPUSE_STATIC 0 -#define HEAPUSE_DYNAMIC 1 +#define MEMUSE_STATIC 0 +#define MEMUSE_DYNAMIC 1 -typedef struct heapuse_s { - int type; /* HEAPUSE_STATIC or HEAPUSE_DYNAMIC */ - int size; /* size of array for static (0 for dynamic) */ - struct heapuse_s *prev; /* previous array on the list */ -} heapuse_t; +typedef struct memuse_s { + int type; /* MEMUSE_STATIC or MEMUSE_DYNAMIC */ + int size; /* size of array for static (0 for dynamic) */ + struct memuse_s *prev; /* previous block on the list */ +} memuse_t; -typedef struct heapuse_list_s { - struct heapuse_list_s *prev; /* last used list */ - heapuse_t *head; /* head of the current list */ -} heapuse_list_t; +typedef struct memuse_list_s { + struct memuse_list_s *prev; /* last used list */ + memuse_t *head; /* head of the current list */ +} memuse_list_t; -extern heapuse_list_t *heapusage; - +/** + * Heap functions + */ void pushheaplist(); -void freeheapusage(heapuse_list_t *heap); -heapuse_list_t *popsaveheaplist(); +memuse_list_t *popsaveheaplist(); void popheaplist(); int markheap(int type, int size); +/** + * Stack functions + */ +void pushstacklist(); +void popstacklist(); +int markstack(int type, int size); + +extern memuse_list_t *heapusage; +extern memuse_list_t *stackusage; + #endif //_INCLUDE_SOURCEPAWN_COMPILER_TRACKER_H_