#define POOL_ALIGN CPU_STRUCT_ALIGN
#endif
+#include <stdint.h>
+
struct mempool {
byte *free, *last;
struct memchunk *first, *current, **plast;
static inline void *mp_alloc_fast(struct mempool *p, uns l)
{
- byte *f = (void *) (((uns) p->free + POOL_ALIGN - 1) & ~(POOL_ALIGN - 1));
+ byte *f = (void *) (((uintptr_t) p->free + POOL_ALIGN - 1) & ~((uintptr_t) POOL_ALIGN - 1));
byte *ee = f + l;
if (ee > p->last)
return mp_alloc(p, l);