1 /*   (C) Copyright 2004, 2005, 2006, 2007, 2008, 2009 Stijn van Dongen
2  *
3  * This file is part of tingea.  You can redistribute and/or modify tingea
4  * under the terms of the GNU General Public License; either version 3 of the
5  * License or (at your option) any later version.  You should have received a
6  * copy of the GPL along with tingea, in the file COPYING.
7 */
8 
9 #ifndef tingea_gralloc_h
10 #define tingea_gralloc_h
11 
12 #include "types.h"
13 
14 /*
15  * gralloc; grid memory allocation; allocation of equally sized chunks
16 */
17 
18 typedef struct mcxGrim mcxGrim;
19 
20 #define MCX_GRIM_GEOMETRIC    1
21 #define MCX_GRIM_ARITHMETIC   2
22 
23 mcxGrim* mcxGrimNew
24 (  dim       sz_unit
25 ,  dim       n_units      /* initial capacity */
26 ,  mcxbits  options
27 )  ;
28 
29 void* mcxGrimGet
30 (  mcxGrim*   src
31 )  ;
32 
33 void mcxGrimLet
34 (  mcxGrim* src
35 ,  void* mem
36 )  ;
37 
38 dim mcxGrimCount
39 (  mcxGrim* src
40 )  ;
41 
42 dim mcxGrimMemSize
43 (  mcxGrim* src
44 )  ;
45 
46 void mcxGrimFree
47 (  mcxGrim** src
48 )  ;
49 
50 #endif
51 
52 
53