HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_SmallObjectAllocator.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: UT_SmallObjectAllocator.h ( UT Library, C++)
7  *
8  * COMMENTS: Small object allocator.
9  */
10 
11 #ifndef __UT_SmallObjectAllocator__
12 #define __UT_SmallObjectAllocator__
13 
14 #include "UT_API.h"
15 #include <SYS/SYS_Types.h>
16 
17 class UT_WorkBuffer;
18 
20 {
21 public:
22  UT_SmallObjectAllocator(bool cleanPages,
23  int pageSize,
24  size_t maxObjectSize,
25  bool threadSafe);
26 
27  static void *allocate(size_t bytes);
28  static void deallocate(void *p, size_t bytes);
29 
30  static void *aligned_allocate(size_t bytes, size_t alginment);
31  static void aligned_free(void *p, size_t bytes);
32 
33  static void dumpStats(UT_WorkBuffer &buf);
34 };
35 
36 #endif
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glcorearb.h:2540
#define UT_API
Definition: UT_API.h:14
OIIO_API void aligned_free(void *ptr)
Definition: format.h:2459