You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
522 B
C
25 lines
522 B
C
#ifndef YSZONE_H
|
|
#define YSZONE_H
|
|
|
|
#include <stddef.h>
|
|
#include <stdlib.h>
|
|
|
|
#define BOOL int
|
|
#define true YES
|
|
#define false NO
|
|
|
|
typedef unsigned int YSUInteger;
|
|
typedef struct _YSZone YSZone;
|
|
|
|
struct _YSZone {
|
|
void *(*malloc)(struct _YSZone *zone, size_t size);
|
|
void (*free)(struct _YSZone *zone, void *ptr);
|
|
int (*lookup)(struct _YSZone *zone, void *ptr);
|
|
YSZone *next;
|
|
};
|
|
|
|
YSZone *YSDefaultMallocZone(void);
|
|
YSZone *YSZoneFromPointer(void *ptr);
|
|
void *YSZoneMalloc(YSZone *zone, YSUInteger size);
|
|
|
|
#endif |