sourcepawn/compiler/sctracker.h
changeset 116 4965c485f121
parent 115 6301d1fa7143
child 117 f1edbb5d485a
     1.1 --- a/sourcepawn/compiler/sctracker.h	Sun Oct 15 20:26:51 2006 +0000
     1.2 +++ b/sourcepawn/compiler/sctracker.h	Sun Oct 15 20:57:14 2006 +0000
     1.3 @@ -1,26 +1,36 @@
     1.4  #ifndef _INCLUDE_SOURCEPAWN_COMPILER_TRACKER_H_
     1.5  #define _INCLUDE_SOURCEPAWN_COMPILER_TRACKER_H_
     1.6  
     1.7 -#define HEAPUSE_STATIC	0
     1.8 -#define HEAPUSE_DYNAMIC	1
     1.9 +#define MEMUSE_STATIC      0
    1.10 +#define MEMUSE_DYNAMIC     1
    1.11  
    1.12 -typedef struct heapuse_s {
    1.13 -	int type;   /* HEAPUSE_STATIC or HEAPUSE_DYNAMIC */
    1.14 -	int size;   /* size of array for static (0 for dynamic) */
    1.15 -	struct heapuse_s *prev; /* previous array on the list */
    1.16 -} heapuse_t;
    1.17 +typedef struct memuse_s {
    1.18 +  int type;   /* MEMUSE_STATIC or MEMUSE_DYNAMIC */
    1.19 +  int size;   /* size of array for static (0 for dynamic) */
    1.20 +  struct memuse_s *prev; /* previous block on the list */
    1.21 +} memuse_t;
    1.22  
    1.23 -typedef struct heapuse_list_s {
    1.24 -	struct heapuse_list_s *prev;   /* last used list */
    1.25 -	heapuse_t *head;               /* head of the current list */
    1.26 -} heapuse_list_t;
    1.27 +typedef struct memuse_list_s {
    1.28 +  struct memuse_list_s *prev;   /* last used list */
    1.29 +  memuse_t *head;               /* head of the current list */
    1.30 +} memuse_list_t;
    1.31  
    1.32 -extern heapuse_list_t *heapusage;
    1.33 -
    1.34 +/**
    1.35 + * Heap functions
    1.36 + */
    1.37  void pushheaplist();
    1.38 -void freeheapusage(heapuse_list_t *heap);
    1.39 -heapuse_list_t *popsaveheaplist();
    1.40 +memuse_list_t *popsaveheaplist();
    1.41  void popheaplist();
    1.42  int markheap(int type, int size);
    1.43  
    1.44 +/**
    1.45 + * Stack functions
    1.46 + */
    1.47 +void pushstacklist();
    1.48 +void popstacklist();
    1.49 +int markstack(int type, int size);
    1.50 +
    1.51 +extern memuse_list_t *heapusage;
    1.52 +extern memuse_list_t *stackusage;
    1.53 +
    1.54  #endif //_INCLUDE_SOURCEPAWN_COMPILER_TRACKER_H_