5 #include <exec/types.h>
8 #ifndef EXEC_MEMHEADEREXT_H
9 #include <exec/memheaderext.h>
12 typedef APTR (*autogrow_get
)(APTR
, IPTR
*);
13 typedef VOID (*autogrow_release
)(APTR
, APTR
, IPTR
);
15 /* Initialization and memory management */
16 APTR
tlsf_init(struct MemHeaderExt
* mhe
);
17 VOID
tlsf_destroy(struct MemHeaderExt
* mhe
);
18 VOID
tlsf_add_memory(struct MemHeaderExt
* mhe
, APTR memory
, IPTR size
);
19 VOID
tlsf_add_memory_and_merge(struct MemHeaderExt
* mhe
, APTR memory
, IPTR size
);
21 /* Allocation functions */
22 APTR
tlsf_malloc(struct MemHeaderExt
* mhe
, IPTR size
, ULONG
* flags
);
23 VOID
tlsf_freemem(struct MemHeaderExt
* mhe
, APTR ptr
, IPTR size
);
24 VOID
tlsf_freevec(struct MemHeaderExt
* mhe
, APTR ptr
);
25 APTR
tlsf_realloc(struct MemHeaderExt
* mhe
, APTR ptr
, IPTR new_size
);
26 APTR
tlsf_allocabs(struct MemHeaderExt
* mhe
, IPTR size
, APTR ptr
);
29 IPTR
tlsf_avail(struct MemHeaderExt
* mhe
, ULONG requirements
);
30 BOOL
tlsf_in_bounds(struct MemHeaderExt
* mhe
, APTR begin
, APTR end
);
32 /* Initialization of MemHeader */
33 void krnCreateTLSFMemHeader(CONST_STRPTR name
, BYTE pri
, APTR start
, IPTR size
, ULONG flags
);
34 struct MemHeader
* krnConvertMemHeaderToTLSF(struct MemHeader
* source
);