1 #include <bindings.dsl.h>
2 #include <apr_allocator.h>
4 module Bindings.APR.Allocator where
7 import Bindings.APR.Errno
9 #opaque_t apr_allocator_t
11 #starttype struct apr_memnode_t
12 #field next , Ptr <apr_memnode_t>
13 #field ref , Ptr (Ptr <apr_memnode_t>)
14 #field index , <apr_uint32_t>
15 #field free_index , <apr_uint32_t>
16 #field first_avail, Ptr CChar
17 #field endp , Ptr CChar
20 #num APR_MEMNODE_T_SIZE
21 #num APR_ALLOCATOR_MAX_FREE_UNLIMITED
23 #ccall apr_allocator_create , Ptr (Ptr <apr_allocator_t>) -> IO <apr_status_t>
24 #ccall apr_allocator_destroy, Ptr <apr_allocator_t> -> IO ()
25 #ccall apr_allocator_alloc , Ptr <apr_allocator_t> -> <apr_size_t> -> IO (Ptr <apr_memnode_t>)
26 #ccall apr_allocator_free , Ptr <apr_allocator_t> -> Ptr <apr_memnode_t> -> IO ()