doh - add the warn flags to the correct cflags.
[AROS.git] / rom / kernel / tlsf.h
blobebc3d767e55e64114079938af88b4283a05b18a2
1 #ifndef _TLSF_H
2 #define _TLSF_H
4 #ifndef EXEC_TYPES_H
5 #include <exec/types.h>
6 #endif
8 #ifndef EXEC_MEMHEADEREXT_H
9 #include <exec/memheaderext.h>
10 #endif
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);
28 /* Query functions */
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);
36 #endif /* _TLSF_H */