118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
|
formatstring(d, fmt, ap); \
va_end(ap); \
}
#define sprintf_sdv(d, fmt) sprintf_sdlv(d, fmt, fmt)
#define fast_f2nat(val) ((int)(val))
extern char *path(char *s);
extern char *loadfile(char *fn, int *size);
extern void endianswap(void *, int, int);
// memory pool that uses buckets and linear allocation for small objects
// VERY fast, and reasonably good memory reuse
struct pool {
enum { POOLSIZE = 4096 }; // can be absolutely anything
|
<
<
|
118
119
120
121
122
123
124
125
126
127
128
129
130
131
|
formatstring(d, fmt, ap); \
va_end(ap); \
}
#define sprintf_sdv(d, fmt) sprintf_sdlv(d, fmt, fmt)
#define fast_f2nat(val) ((int)(val))
extern void endianswap(void *, int, int);
// memory pool that uses buckets and linear allocation for small objects
// VERY fast, and reasonably good memory reuse
struct pool {
enum { POOLSIZE = 4096 }; // can be absolutely anything
|