|
UDK 3.2.7 C/C++ API Reference
|
00001 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 00002 /* 00003 * This file is part of the LibreOffice project. 00004 * 00005 * This Source Code Form is subject to the terms of the Mozilla Public 00006 * License, v. 2.0. If a copy of the MPL was not distributed with this 00007 * file, You can obtain one at http://mozilla.org/MPL/2.0/. 00008 * 00009 * This file incorporates work covered by the following license notice: 00010 * 00011 * Licensed to the Apache Software Foundation (ASF) under one or more 00012 * contributor license agreements. See the NOTICE file distributed 00013 * with this work for additional information regarding copyright 00014 * ownership. The ASF licenses this file to you under the Apache 00015 * License, Version 2.0 (the "License"); you may not use this file 00016 * except in compliance with the License. You may obtain a copy of 00017 * the License at http://www.apache.org/licenses/LICENSE-2.0 . 00018 */ 00019 00020 #ifndef _RTL_ALLOC_H_ 00021 #define _RTL_ALLOC_H_ 00022 00023 #include "sal/config.h" 00024 00025 #include "sal/saldllapi.h" 00026 #include "sal/types.h" 00027 00028 #ifdef __cplusplus 00029 extern "C" { 00030 #endif 00031 00032 00040 SAL_DLLPUBLIC void * SAL_CALL rtl_allocateMemory ( 00041 sal_Size Bytes 00042 ) SAL_THROW_EXTERN_C(); 00043 00044 00059 SAL_DLLPUBLIC void * SAL_CALL rtl_reallocateMemory ( 00060 void * Ptr, 00061 sal_Size Bytes 00062 ) SAL_THROW_EXTERN_C(); 00063 00064 00069 SAL_DLLPUBLIC void SAL_CALL rtl_freeMemory ( 00070 void * Ptr 00071 ) SAL_THROW_EXTERN_C(); 00072 00073 00081 SAL_DLLPUBLIC void * SAL_CALL rtl_allocateZeroMemory ( 00082 sal_Size Bytes 00083 ) SAL_THROW_EXTERN_C(); 00084 00085 00091 SAL_DLLPUBLIC void SAL_CALL rtl_freeZeroMemory ( 00092 void * Ptr, 00093 sal_Size Bytes 00094 ) SAL_THROW_EXTERN_C(); 00095 00096 00099 typedef struct rtl_arena_st rtl_arena_type; 00100 00101 #define RTL_ARENA_NAME_LENGTH 31 00102 00103 00118 SAL_DLLPUBLIC rtl_arena_type * SAL_CALL rtl_arena_create ( 00119 const char * pName, 00120 sal_Size quantum, 00121 sal_Size quantum_cache_max, 00122 rtl_arena_type * source_arena, 00123 void * (SAL_CALL * source_alloc)(rtl_arena_type *, sal_Size *), 00124 void (SAL_CALL * source_free) (rtl_arena_type *, void *, sal_Size), 00125 int nFlags 00126 ) SAL_THROW_EXTERN_C(); 00127 00128 00136 SAL_DLLPUBLIC void SAL_CALL rtl_arena_destroy ( 00137 rtl_arena_type * pArena 00138 ) SAL_THROW_EXTERN_C(); 00139 00140 00150 SAL_DLLPUBLIC void * SAL_CALL rtl_arena_alloc ( 00151 rtl_arena_type * pArena, 00152 sal_Size * pBytes 00153 ) SAL_THROW_EXTERN_C(); 00154 00155 00166 SAL_DLLPUBLIC void SAL_CALL rtl_arena_free ( 00167 rtl_arena_type * pArena, 00168 void * pAddr, 00169 sal_Size nBytes 00170 ) SAL_THROW_EXTERN_C(); 00171 00172 00175 typedef struct rtl_cache_st rtl_cache_type; 00176 00177 #define RTL_CACHE_NAME_LENGTH 31 00178 00179 #define RTL_CACHE_FLAG_BULKDESTROY 1 00180 00196 SAL_DLLPUBLIC rtl_cache_type * SAL_CALL rtl_cache_create ( 00197 const char * pName, 00198 sal_Size nObjSize, 00199 sal_Size nObjAlign, 00200 int (SAL_CALL * constructor)(void * pObj, void * pUserArg), 00201 void (SAL_CALL * destructor) (void * pObj, void * pUserArg), 00202 void (SAL_CALL * reclaim) (void * pUserArg), 00203 void * pUserArg, 00204 rtl_arena_type * pSource, 00205 int nFlags 00206 ) SAL_THROW_EXTERN_C(); 00207 00208 00217 SAL_DLLPUBLIC void SAL_CALL rtl_cache_destroy ( 00218 rtl_cache_type * pCache 00219 ) SAL_THROW_EXTERN_C(); 00220 00221 00228 SAL_DLLPUBLIC void * SAL_CALL rtl_cache_alloc ( 00229 rtl_cache_type * pCache 00230 ) SAL_THROW_EXTERN_C(); 00231 00232 00242 SAL_DLLPUBLIC void SAL_CALL rtl_cache_free ( 00243 rtl_cache_type * pCache, 00244 void * pObj 00245 ) SAL_THROW_EXTERN_C(); 00246 00247 00248 #ifdef __cplusplus 00249 } 00250 #endif 00251 00252 #endif /*_RTL_ALLOC_H_ */ 00253 00254 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
1.7.3