exec.library: Use the new AROS_UFIx() macros
[AROS.git] / rom / exec / mungwall.h
bloba135e21601ae2e50af21f33bced91fe06a0d922a
1 #undef MDEBUG
2 #define MDEBUG 1
4 #include <aros/debug.h>
5 #include <exec/memory.h>
7 #define MUNGWALL_HEADER_ID 0x1ADEBCA1
9 struct MungwallHeader
11 struct MinNode mwh_node;
12 ULONG mwh_magicid; /* ID for validation */
13 BOOL mwh_fault; /* Fault state indicator */
14 IPTR mwh_allocsize; /* Allocation size (requested by the caller) */
15 APTR mwh_pool; /* Pool to which the allocation belongs */
16 const char *mwh_AllocFunc; /* Name of API allocator function */
17 struct Task *mwh_Owner; /* Allocator task */
18 APTR mwh_Caller; /* Caller address */
22 * Total size of mungwall header needs to be a multiple of MEMCHUNK_TOTAL
23 * for keeping proper alignment.
25 #define MUNGWALLHEADER_SIZE (AROS_ROUNDUP2(sizeof(struct MungwallHeader), MEMCHUNK_TOTAL))
26 #define MUNGWALL_BLOCK_SHIFT (MUNGWALLHEADER_SIZE + MUNGWALL_SIZE)
27 #define MUNGWALL_TOTAL_SIZE (MUNGWALLHEADER_SIZE + MUNGWALL_SIZE * 2)
29 struct TraceLocation;
31 APTR MungWall_Build(APTR res, APTR pool, IPTR origSize, ULONG requirements, struct TraceLocation *trace, struct ExecBase *SysBase);
32 APTR MungWall_Check(APTR memoryBlock, IPTR byteSize, struct TraceLocation *trace, struct ExecBase *SysBase);
33 void MungWall_Scan(APTR pool, struct TraceLocation *trace, struct ExecBase *SysBase);