home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / CODING / GRAPHICS / GMSMTH01.ZIP / INCLUDE / GMALLOC.H < prev    next >
Encoding:
C/C++ Source or Header  |  1995-12-05  |  956 b   |  56 lines

  1. /*
  2.    Copyright 1993, Alec Russell, ALL rights reserved
  3.  
  4.    FILE : gmalloc.h
  5.  
  6.    HISTORY:
  7.       created :june 20, 1993
  8.       updates :
  9.           5Dec95: by Bruce Miller:  added MAX_GMALLOC_SIZE
  10.  
  11. */
  12.  
  13.  
  14. #ifndef DEF_GMALLOC
  15. #define DEF_GMALLOC 1
  16.  
  17. #include <g_def.h>
  18.  
  19. #define MAX_GMALLOC_SIZE 65520L
  20. #define MAX_MEM_NAME 10
  21. #define MAGIC_COOKIE 0xabc9
  22.  
  23.  
  24. typedef struct t_mem
  25.    {
  26.    char name[MAX_MEM_NAME+1];
  27.    USHORT size;
  28.    void huge *b;
  29.    void *bn;
  30.    struct t_mem *next;
  31.    }
  32. mem_t;
  33.  
  34. typedef struct
  35.    {
  36.    short num;
  37.    mem_t *head, *tail;
  38.    }
  39. mem_list_t;
  40.  
  41. extern mem_list_t mem_list;
  42.  
  43. void init_mem_list(void);
  44. void list_mem(void);
  45. void far *gmalloc(USHORT size, char *name);
  46. void gfree(void huge *b, char *name);
  47. void list_heap(void);
  48. void nfree(void *b, char *name);
  49. void *nmalloc(USHORT size, char *name);
  50.  
  51.  
  52. #endif
  53.  
  54. /* ------------------------------ end of file ------------------------- */
  55.  
  56.