Numerous code documentation fixups (
bug 5720, r=psychonic).
1 #ifndef _INCLUDE_KNIGHT_ALLOCATOR_H_
2 #define _INCLUDE_KNIGHT_ALLOCATOR_H_
8 typedef struct ke_allocator_s ke_allocator_t;
10 typedef void *(*KEFN_ALLOCATOR)(ke_allocator_t *, size_t);
11 typedef void (*KEFN_DEALLOCATOR)(ke_allocator_t *, void *);
16 KEFN_DEALLOCATOR dealloc;
20 inline void *operator new(size_t size, ke_allocator_t *alloc)
22 return alloc->alloc(alloc, size);
25 inline void *operator new [](size_t size, ke_allocator_t *alloc)
27 return alloc->alloc(alloc, size);
31 void ke_destroy(ke_allocator_t *alloc, T * data)
34 alloc->dealloc(alloc, data);
37 #endif //_INCLUDE_KNIGHT_ALLOCATOR_H_