2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
8 #include <aros/config.h>
9 #include "exec_intern.h"
10 #include <aros/libcall.h>
11 #include <exec/memory.h>
12 #include <proto/exec.h>
14 #include "exec_debug.h"
15 #ifndef DEBUG_AllocEntry
16 # define DEBUG_AllocEntry 0
22 #include <aros/debug.h>
25 /*****************************************************************************
29 AROS_LH1(struct MemList
*, AllocEntry
,
32 AROS_LHA(struct MemList
*, entry
, A0
),
35 struct ExecBase
*, SysBase
, 37, Exec
)
38 Allocate a number of memory blocks through a MemList structure.
41 entry - The MemList with one MemEntry for each block you want to get
44 The allocation was successful if the most significant bit of the
45 result is 0. The result then contains a pointer to a copy of
46 the MemList structure with the me_Addr fields filled.
47 If the most significant bit is set the result contains the type of
48 memory that couldn't be allocated.
61 ******************************************************************************/
68 if (NewAllocEntry(entry
, &ret
, &ret_flags
))
70 /* Check nasty case where the returncode is misleading :-(
71 Like when memory was allocated at address 0x8???????. And
72 0x80000000 flag is at the same time used to indicate allocentry
75 if(!AROS_CHECK_ALLOCENTRY(ret
))
78 ret
= AROS_ALLOCENTRY_FAILED(MEMF_PUBLIC
);
83 ret
= AROS_ALLOCENTRY_FAILED(ret_flags
);