File: malloc.h

package info (click to toggle)
gbdk 2.0.17-3
  • links: PTS
  • area: non-free
  • in suites: potato
  • size: 8,472 kB
  • ctags: 9,307
  • sloc: ansic: 42,333; asm: 7,010; makefile: 912; yacc: 375; awk: 154; csh: 144; sh: 59
file content (26 lines) | stat: -rw-r--r-- 508 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#ifndef __SYS_MEM_H
#include <gb.h>
#include <stdlib.h>

#define MALLOC_UNUSED	0
#define MALLOC_FREE	1
#define MALLOC_USED	2
#define MALLOC_MAGIC	123
#define MALLOC_NUMHUNKS	10
typedef struct smalloc_hunk	mmalloc_hunk;
typedef struct smalloc_hunk *	pmmalloc_hunk;

struct smalloc_hunk {
	UBYTE magic;
	pmmalloc_hunk	next;
	UWORD size;
	int status;
};

extern UBYTE malloc_heap_start;

extern pmmalloc_hunk malloc_first;

void malloc_gc(void);
void debug( char *routine, char *msg );
#endif	/* __SYS_MEM_H */