Check for SYS/GL during library init. Reason is that
[AROS.git] / workbench / libs / reqtools / mem.c
blobf3a9b5da9c64db466b37d5af91cafb85c99c3bd8
1 #include "filereq.h"
3 #ifndef __AROS__
4 APTR REGARGS AllocVecPooled (APTR pool, ULONG memsize)
6 if (pool)
8 IPTR *mem;
10 memsize += sizeof(IPTR);
12 if ((mem = AllocPooled(pool, memsize)))
14 *mem++ = memsize;
17 return mem;
19 else
21 return AllocVec(memsize, MEMF_PUBLIC | MEMF_CLEAR);
25 void REGARGS FreeVecPooled (APTR pool, APTR mem)
27 if (mem)
29 if (pool)
31 IPTR *imem = (IPTR *)mem;
32 IPTR size = *--imem;
34 FreePooled(pool, imem, size);
36 else
38 FreeVec(mem);
42 #endif