2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
6 #include <proto/exec.h>
13 APTR poolclear
= NULL
;
15 #define ALLOCTEST(cmd) \
19 #define FREETEST(cmd) \
23 int main(int argc, char **argv)
26 pool
= CreatePool(MEMF_ANY
, 16384, 8192);
27 poolclear
= CreatePool(MEMF_ANY
|MEMF_CLEAR
, 16384, 8192);
29 /* Behavior validated with OS3.x, OS4.x and MorphOS */
31 ALLOCTEST(AllocMem(0, MEMF_ANY
))
32 ALLOCTEST(AllocMem(0, MEMF_ANY
| MEMF_CLEAR
))
33 FREETEST(FreeMem(NULL
, 0))
36 ALLOCTEST(AllocVec(0, MEMF_ANY
))
37 ALLOCTEST(AllocVec(0, MEMF_ANY
| MEMF_CLEAR
))
38 FREETEST(FreeVec(NULL
))
41 ALLOCTEST(AllocPooled(pool
, 0))
42 ALLOCTEST(AllocPooled(poolclear
, 0))
43 FREETEST(FreePooled(pool
, NULL
, 0))
46 ALLOCTEST(AllocVecPooled(pool
, 0))
47 ALLOCTEST(AllocVecPooled(poolclear
, 0))
48 FREETEST(FreeVecPooled(pool
, NULL
))
58 DeletePool(poolclear
);