~kris/9p

9hist

ref: 2c5e885bd9ac1824b4e5d4546124c79a1ec5acb0 9hist/gnot/malloc.h -rw-r--r-- 383 bytes
2c5e885b — David du Colombier Plan 9 from Bell Labs 1993-04-08 33 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
struct tbl_entry {
	struct tbl_entry *next;		/* free list */
	int *data;			/* data */
};

struct table {
	int size;			/* # entries */
	struct tbl_entry *entries;	/* the entries */
	struct tbl_entry *free;		/* the free list */
};

void *tbl_alloc(struct table *, int);
void tbl_free(struct table *, void *);
int tbl_index(struct table *, void *);
void *tbl_data(struct table *, int);