2 Copyright � 2003-2012, The AROS Development Team. All rights reserved.
6 #include <aros/libcall.h>
7 #include <proto/exec.h>
8 #include <exec/memheaderext.h>
9 #include "exec_intern.h"
10 #include <aros/debug.h>
12 AROS_LH2(APTR
, AllocVecPooled
,
13 AROS_LHA(APTR
, pool
, D0
),
14 AROS_LHA(IPTR
, size
, D1
),
15 struct ExecBase
*, SysBase
, 169, Exec
)
19 struct MemHeaderExt
*mhe
= (struct MemHeaderExt
*)pool
;
21 if (mhe
->mhe_MemHeader
.mh_Attributes
& MEMF_MANAGED
)
23 ULONG attributes
= (ULONG
)(IPTR
)mhe
->mhe_MemHeader
.mh_First
;
26 return mhe
->mhe_AllocVec(mhe
, size
, &attributes
);
34 if (pool
== NULL
) return NULL
;
37 memory
= AllocPooled(pool
, size
);
48 } /* AllocVecPooled() */