Corrections to SVN properties.
[AROS.git] / workbench / classes / zune / nlist / nlist_mcc / extrasrc / AllocVecPooled.c
blobcf8ac6e72666c4edf49f74e43ecef767ea9ca2a5
1 /***************************************************************************
3 NList.mcc - New List MUI Custom Class
4 Registered MUI class, Serial Number: 1d51 0x9d510030 to 0x9d5100A0
5 0x9d5100C0 to 0x9d5100FF
7 Copyright (C) 1996-2001 by Gilles Masson
8 Copyright (C) 2001-2013 by NList Open Source Team
10 This library is free software; you can redistribute it and/or
11 modify it under the terms of the GNU Lesser General Public
12 License as published by the Free Software Foundation; either
13 version 2.1 of the License, or (at your option) any later version.
15 This library is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 Lesser General Public License for more details.
20 NList classes Support Site: http://www.sf.net/projects/nlist-classes
22 $Id$
24 ***************************************************************************/
26 #include <exec/types.h>
27 #include <proto/exec.h>
29 /// AllocVecPooled
30 // allocate a vector of <memSize> bytes from the pool specified by <poolHeader>
31 APTR AllocVecPooled(APTR poolHeader, ULONG memSize)
33 ULONG *memory;
35 // add the number of bytes used to store the size information
36 memSize += sizeof(ULONG);
38 // allocate memory from the pool
39 if((memory = AllocPooled(poolHeader, memSize)) != NULL)
41 // and finally store the size of the memory block, including the size itself
42 *memory++ = memSize;
45 return memory;
48 ///