src/libtess2/bucketalloc.h
Go to the documentation of this file.
00001 /*
00002 ** SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) 
00003 ** Copyright (C) [dates of first publication] Silicon Graphics, Inc.
00004 ** All Rights Reserved.
00005 **
00006 ** Permission is hereby granted, free of charge, to any person obtaining a copy
00007 ** of this software and associated documentation files (the "Software"), to deal
00008 ** in the Software without restriction, including without limitation the rights
00009 ** to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
00010 ** of the Software, and to permit persons to whom the Software is furnished to do so,
00011 ** subject to the following conditions:
00012 ** 
00013 ** The above copyright notice including the dates of first publication and either this
00014 ** permission notice or a reference to http://oss.sgi.com/projects/FreeB/ shall be
00015 ** included in all copies or substantial portions of the Software. 
00016 **
00017 ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
00018 ** INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
00019 ** PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL SILICON GRAPHICS, INC.
00020 ** BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
00021 ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
00022 ** OR OTHER DEALINGS IN THE SOFTWARE.
00023 ** 
00024 ** Except as contained in this notice, the name of Silicon Graphics, Inc. shall not
00025 ** be used in advertising or otherwise to promote the sale, use or other dealings in
00026 ** this Software without prior written authorization from Silicon Graphics, Inc.
00027 */
00028 /*
00029 ** Author: Mikko Mononen, July 2009.
00030 */
00031 
00032 #ifndef MEMALLOC_H
00033 #define MEMALLOC_H
00034 
00035 #ifdef __cplusplus
00036 extern "C" {
00037 #endif
00038 
00039 #include "tesselator.h"
00040     
00041 struct BucketAlloc *createBucketAlloc( TESSalloc* alloc, const char *name,
00042                                       unsigned int itemSize, unsigned int bucketSize );
00043 void *bucketAlloc( struct BucketAlloc *ba);
00044 void bucketFree( struct BucketAlloc *ba, void *ptr );
00045 void deleteBucketAlloc( struct BucketAlloc *ba );
00046 
00047 #ifdef __cplusplus
00048 };
00049 #endif
00050 
00051 #endif