Category : C Source Code
Archive   : SNIP1292.ZIP
Filename : JMALLOC.H

 
Output of file : JMALLOC.H contained in archive : SNIP1292.ZIP
/*-------------------------[ jmalloc.h ]------------------------*/
/* drop-in for malloc with diags */
/*--------------------------------------------------------------*/

typedef struct mlist
{
struct mlist *NextLink; /* link to next struct */
char *MAddr; /* address assigned */
unsigned MSize; /* size allocated */
} MLINK;

/*--------------------------------------------------------------*/
/*--------------------[ public prototypes ]---------------------*/
/*--------------------------------------------------------------*/

#ifdef DBUG
void *JMalloc(unsigned size);
void *JCalloc(unsigned size, unsigned sizeach);
void j_free(void *AllocAddr, char *file, int line);
#define JFree(a) j_free(a, __FILE__, __LINE__)
int JMemcheck(void);
#else
#define JMalloc(a) malloc(a)
#define JCalloc((a), (b)) calloc((a), (b))
#define JFree(a) free(a)
#define JMemcheck(a)
#endif

/*--------------------------------------------------------------*/
/*---------------------[ public variables ]---------------------*/
/*--------------------------------------------------------------*/

extern MLINK *MalTop;


  3 Responses to “Category : C Source Code
Archive   : SNIP1292.ZIP
Filename : JMALLOC.H

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/