UDK 3.2.7 C/C++ API Reference
|
00001 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 00002 /************************************************************************* 00003 * 00004 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 00005 * 00006 * Copyright 2000, 2010 Oracle and/or its affiliates. 00007 * 00008 * OpenOffice.org - a multi-platform office productivity suite 00009 * 00010 * This file is part of OpenOffice.org. 00011 * 00012 * OpenOffice.org is free software: you can redistribute it and/or modify 00013 * it under the terms of the GNU Lesser General Public License version 3 00014 * only, as published by the Free Software Foundation. 00015 * 00016 * OpenOffice.org is distributed in the hope that it will be useful, 00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 * GNU Lesser General Public License version 3 for more details 00020 * (a copy is included in the LICENSE file that accompanied this code). 00021 * 00022 * You should have received a copy of the GNU Lesser General Public License 00023 * version 3 along with OpenOffice.org. If not, see 00024 * <http://www.openoffice.org/license.html> 00025 * for a copy of the LGPLv3 License. 00026 * 00027 ************************************************************************/ 00028 00029 #ifndef _RTL_ALLOC_H_ 00030 #define _RTL_ALLOC_H_ 00031 00032 # include <sal/types.h> 00033 00034 #ifdef __cplusplus 00035 extern "C" { 00036 #endif 00037 00038 00046 SAL_DLLPUBLIC void * SAL_CALL rtl_allocateMemory ( 00047 sal_Size Bytes 00048 ) SAL_THROW_EXTERN_C(); 00049 00050 00065 SAL_DLLPUBLIC void * SAL_CALL rtl_reallocateMemory ( 00066 void * Ptr, 00067 sal_Size Bytes 00068 ) SAL_THROW_EXTERN_C(); 00069 00070 00075 SAL_DLLPUBLIC void SAL_CALL rtl_freeMemory ( 00076 void * Ptr 00077 ) SAL_THROW_EXTERN_C(); 00078 00079 00087 SAL_DLLPUBLIC void * SAL_CALL rtl_allocateZeroMemory ( 00088 sal_Size Bytes 00089 ) SAL_THROW_EXTERN_C(); 00090 00091 00097 SAL_DLLPUBLIC void SAL_CALL rtl_freeZeroMemory ( 00098 void * Ptr, 00099 sal_Size Bytes 00100 ) SAL_THROW_EXTERN_C(); 00101 00102 00105 typedef struct rtl_arena_st rtl_arena_type; 00106 00107 #define RTL_ARENA_NAME_LENGTH 31 00108 00109 00124 SAL_DLLPUBLIC rtl_arena_type * SAL_CALL rtl_arena_create ( 00125 const char * pName, 00126 sal_Size quantum, 00127 sal_Size quantum_cache_max, 00128 rtl_arena_type * source_arena, 00129 void * (SAL_CALL * source_alloc)(rtl_arena_type *, sal_Size *), 00130 void (SAL_CALL * source_free) (rtl_arena_type *, void *, sal_Size), 00131 int nFlags 00132 ) SAL_THROW_EXTERN_C(); 00133 00134 00142 SAL_DLLPUBLIC void SAL_CALL rtl_arena_destroy ( 00143 rtl_arena_type * pArena 00144 ) SAL_THROW_EXTERN_C(); 00145 00146 00156 SAL_DLLPUBLIC void * SAL_CALL rtl_arena_alloc ( 00157 rtl_arena_type * pArena, 00158 sal_Size * pBytes 00159 ) SAL_THROW_EXTERN_C(); 00160 00161 00172 SAL_DLLPUBLIC void SAL_CALL rtl_arena_free ( 00173 rtl_arena_type * pArena, 00174 void * pAddr, 00175 sal_Size nBytes 00176 ) SAL_THROW_EXTERN_C(); 00177 00178 00181 typedef struct rtl_cache_st rtl_cache_type; 00182 00183 #define RTL_CACHE_NAME_LENGTH 31 00184 00185 #define RTL_CACHE_FLAG_BULKDESTROY 1 00186 00202 SAL_DLLPUBLIC rtl_cache_type * SAL_CALL rtl_cache_create ( 00203 const char * pName, 00204 sal_Size nObjSize, 00205 sal_Size nObjAlign, 00206 int (SAL_CALL * constructor)(void * pObj, void * pUserArg), 00207 void (SAL_CALL * destructor) (void * pObj, void * pUserArg), 00208 void (SAL_CALL * reclaim) (void * pUserArg), 00209 void * pUserArg, 00210 rtl_arena_type * pSource, 00211 int nFlags 00212 ) SAL_THROW_EXTERN_C(); 00213 00214 00223 SAL_DLLPUBLIC void SAL_CALL rtl_cache_destroy ( 00224 rtl_cache_type * pCache 00225 ) SAL_THROW_EXTERN_C(); 00226 00227 00234 SAL_DLLPUBLIC void * SAL_CALL rtl_cache_alloc ( 00235 rtl_cache_type * pCache 00236 ) SAL_THROW_EXTERN_C(); 00237 00238 00248 SAL_DLLPUBLIC void SAL_CALL rtl_cache_free ( 00249 rtl_cache_type * pCache, 00250 void * pObj 00251 ) SAL_THROW_EXTERN_C(); 00252 00253 00254 #ifdef __cplusplus 00255 } 00256 #endif 00257 00258 #endif /*_RTL_ALLOC_H_ */ 00259 00260 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */