opennurbs_memory.h
Go to the documentation of this file.
00001 /* $NoKeywords: $ */
00002 /*
00003 //
00004 // Copyright (c) 1993-2012 Robert McNeel & Associates. All rights reserved.
00005 // OpenNURBS, Rhinoceros, and Rhino3D are registered trademarks of Robert
00006 // McNeel & Associates.
00007 //
00008 // THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
00009 // ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR PURPOSE AND OF
00010 // MERCHANTABILITY ARE HEREBY DISCLAIMED.
00011 //                              
00012 // For complete openNURBS copyright information see <http://www.opennurbs.org>.
00013 //
00015 */
00016 
00017 #if !defined(OPENNURBS_MEMORY_INC_)
00018 #define OPENNURBS_MEMORY_INC_
00019 
00020 #if defined (cplusplus) || defined(_cplusplus) || defined(__cplusplus)
00021 extern "C" {
00022 #endif
00023 
00024 ON_DECL
00025 size_t ON_MemoryPageSize();
00026 
00027 #define ON_MEMORY_POOL void
00028 
00029 ON_DECL
00030 ON_MEMORY_POOL* ON_MainMemoryPool(void);
00031 
00032 ON_DECL
00033 ON_MEMORY_POOL* ON_WorkerMemoryPool(void);
00034 
00035 ON_DECL
00036 void*  onmalloc( size_t );
00037 
00038 ON_DECL
00039 void*  onmalloc_from_pool( ON_MEMORY_POOL*, size_t );
00040 
00041 ON_DECL
00042 void*  oncalloc( size_t, size_t );
00043 
00044 ON_DECL
00045 void*  oncalloc_from_pool( ON_MEMORY_POOL*, size_t, size_t );
00046 
00047 ON_DECL
00048 void   onfree( void* );
00049 
00050 ON_DECL
00051 void*  onrealloc( void*, size_t );
00052 
00053 ON_DECL
00054 void*  onrealloc_from_pool( ON_MEMORY_POOL*, void*, size_t );
00055 
00056 ON_DECL
00057 size_t onmsize( const void* );
00058 
00059 ON_DECL
00060 void*  onmemdup( const void*, size_t );
00061 
00062 ON_DECL
00063 char*  onstrdup( const char* );
00064 
00065 #if defined(_WCHAR_T_DEFINED)
00066 ON_DECL
00067 wchar_t* onwcsdup( const wchar_t* );
00068 #endif
00069 
00070 ON_DECL
00071 unsigned char* onmbsdup( const unsigned char* );
00072 
00073 ON_DECL
00074 size_t onmemoryusecount(
00075           size_t* malloc_count, 
00076           size_t* realloc_count, 
00077           size_t* free_count, 
00078           size_t* pool_count 
00079           );
00080 
00081 ON_DECL
00082 size_t onmemoryusecountex(
00083           size_t* malloc_count, 
00084           size_t* realloc_count, 
00085           size_t* free_count, 
00086           size_t* pool_count,
00087           size_t* malloc_zero_count,
00088           size_t* free_null_count 
00089           );
00090 
00091 /* define to handle _TCHAR* ontcsdup( const _TCHAR* ) */
00092 #if defined(_UNICODE)
00093 #define ontcsdup onwcsdup
00094 #elif defined(_MBCS)
00095 #define ontcsdup onmbsdup
00096 #else
00097 #define ontcsdup onstrdup
00098 #endif
00099 
00100 #if defined (cplusplus) || defined(_cplusplus) || defined(__cplusplus)
00101 }
00102 #endif
00103 
00104 #endif


pcl
Author(s): Open Perception
autogenerated on Wed Aug 26 2015 15:27:01