Don't call ReadArgs() if started from WB.
[tangerine.git] / compiler / alib / libcreatepool.c
blob706f0164eb9622a5b8edf0a1e89fa31899165b7f
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 Original version from libnix
4 $Id$
5 */
7 #include "pool.h"
9 /*****************************************************************************
11 NAME */
12 #include <proto/alib.h>
14 APTR LibCreatePool (
16 /* SYNOPSIS */
17 ULONG requirements,
18 ULONG puddleSize,
19 ULONG threshSize)
21 /* FUNCTION
23 INPUTS
25 RESULT
27 NOTES
29 EXAMPLE
31 BUGS
33 SEE ALSO
35 INTERNALS
37 HISTORY
38 06.12.96 digulla Created after original from libnix
40 ******************************************************************************/
42 AROS_GET_SYSBASE_OK
43 if (SysBase->LibNode.lib_Version >= 39)
44 return (CreatePool (requirements, puddleSize, threshSize));
47 POOL * pool = NULL;
49 if (threshSize <= puddleSize)
51 if ((pool = (POOL *)AllocMem (sizeof (POOL), MEMF_ANY)) != NULL)
53 NEWLIST (&pool->PuddleList);
55 puddleSize = ((puddleSize + 7) & ~7);
57 pool->MemoryFlags = requirements;
58 pool->PuddleSize = puddleSize;
59 pool->ThreshSize = threshSize;
63 return (APTR)pool;
65 } /* LibCreatePool */