5 Copyright © 1995-2012, The AROS Development Team. All rights reserved.
13 # include <exec/nodes.h>
20 struct MemChunk
* mh_First
;
28 struct MemChunk
*mc_Next
;
32 /* Total size of struct MemChunk, including padding */
33 #define MEMCHUNK_TOTAL (AROS_WORSTALIGN > sizeof(struct MemChunk) ? AROS_WORSTALIGN : sizeof(struct MemChunk))
34 /* Total size of struct MemHeader, including padding */
35 #define MEMHEADER_TOTAL (AROS_ROUNDUP2(sizeof(struct MemHeader), MEMCHUNK_TOTAL))
46 #define me_Reqs me_Un.meu_Reqs
47 #define me_Addr me_Un.meu_Addr
53 struct MemEntry ml_ME
[1];
56 #define MEM_BLOCKSIZE 8L
57 #define MEM_BLOCKMASK (MEM_BLOCKSIZE - 1)
59 /* Memory allocation flags */
62 #define MEMF_PUBLIC (1L << MEMB_PUBLIC)
64 #define MEMF_CHIP (1L << MEMB_CHIP)
66 #define MEMF_FAST (1L << MEMB_FAST)
67 #define MEMB_VIRTUAL 3 /* AmigaOS v4 compatible */
68 #define MEMF_VIRTUAL (1L << MEMB_VIRTUAL)
69 #define MEMB_EXECUTABLE 4 /* AmigaOS v4 compatible */
70 #define MEMF_EXECUTABLE (1L << MEMB_EXECUTABLE)
72 #define MEMF_LOCAL (1L << MEMB_LOCAL)
73 #define MEMB_24BITDMA 9
74 #define MEMF_24BITDMA (1L << MEMB_24BITDMA)
76 #define MEMF_KICK (1L << MEMB_KICK)
77 #define MEMB_PRIVATE 11
78 #define MEMF_PRIVATE (1L << MEMB_PRIVATE)
79 #define MEMB_31BIT 12 /* Low address space (<2GB). Effective only on 64 bit machines. */
80 #define MEMF_31BIT (1L << MEMB_31BIT)
82 #define MEMB_CLEAR 16 /* Explicitly clear memory after allocation */
83 #define MEMF_CLEAR (1L << MEMB_CLEAR)
84 #define MEMB_LARGEST 17
85 #define MEMF_LARGEST (1L << MEMB_LARGEST)
86 #define MEMB_REVERSE 18
87 #define MEMF_REVERSE (1L << MEMB_REVERSE)
89 #define MEMF_TOTAL (1L << MEMB_TOTAL)
90 #define MEMB_HWALIGNED 20 /* For AllocMem() - align address and size to physical page boundary */
91 #define MEMF_HWALIGNED (1L << MEMB_HWALIGNED)
92 #define MEMB_SEM_PROTECTED 20 /* For CreatePool() - add semaphore protection to the pool */
93 #define MEMF_SEM_PROTECTED (1L << MEMB_SEM_PROTECTED)
94 #define MEMB_NO_EXPUNGE 31
95 #define MEMF_NO_EXPUNGE (1L << MEMB_NO_EXPUNGE)
98 * Mask for flags that describe physical properties of the memory.
99 * MEMF_31BIT is effective only on 64-bit machines.
100 * This is actually AROS internal definition, it may change. Do not rely on it.
102 #if (__WORDSIZE == 64)
103 #define MEMF_PHYSICAL_MASK (MEMF_PUBLIC|MEMF_CHIP|MEMF_FAST|MEMF_LOCAL|MEMF_24BITDMA|MEMF_KICK|MEMF_31BIT)
105 #define MEMF_PHYSICAL_MASK (MEMF_PUBLIC|MEMF_CHIP|MEMF_FAST|MEMF_LOCAL|MEMF_24BITDMA|MEMF_KICK)
108 struct MemHandlerData
110 IPTR memh_RequestSize
;
111 ULONG memh_RequestFlags
;
115 #define MEMHF_RECYCLE (1L<<0)
117 #define MEM_ALL_DONE (-1)
118 #define MEM_DID_NOTHING 0
119 #define MEM_TRY_AGAIN 1
121 #endif /* EXEC_MEMORY_H */