My Project
UDK 3.2.7 C/C++ API Reference
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
alloc.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
3  *
4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5  *
6  * Copyright 2000, 2010 Oracle and/or its affiliates.
7  *
8  * OpenOffice.org - a multi-platform office productivity suite
9  *
10  * This file is part of OpenOffice.org.
11  *
12  * OpenOffice.org is free software: you can redistribute it and/or modify
13  * it under the terms of the GNU Lesser General Public License version 3
14  * only, as published by the Free Software Foundation.
15  *
16  * OpenOffice.org is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU Lesser General Public License version 3 for more details
20  * (a copy is included in the LICENSE file that accompanied this code).
21  *
22  * You should have received a copy of the GNU Lesser General Public License
23  * version 3 along with OpenOffice.org. If not, see
24  * <http://www.openoffice.org/license.html>
25  * for a copy of the LGPLv3 License.
26  *
27  ************************************************************************/
28 
29 #ifndef _RTL_ALLOC_H_
30 #define _RTL_ALLOC_H_
31 
32 # include <sal/types.h>
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
38 
46 SAL_DLLPUBLIC void * SAL_CALL rtl_allocateMemory (
47  sal_Size Bytes
49 
50 
65 SAL_DLLPUBLIC void * SAL_CALL rtl_reallocateMemory (
66  void * Ptr,
67  sal_Size Bytes
69 
70 
75 SAL_DLLPUBLIC void SAL_CALL rtl_freeMemory (
76  void * Ptr
78 
79 
87 SAL_DLLPUBLIC void * SAL_CALL rtl_allocateZeroMemory (
88  sal_Size Bytes
90 
91 
97 SAL_DLLPUBLIC void SAL_CALL rtl_freeZeroMemory (
98  void * Ptr,
99  sal_Size Bytes
101 
102 
105 typedef struct rtl_arena_st rtl_arena_type;
106 
107 #define RTL_ARENA_NAME_LENGTH 31
108 
109 
125  const char * pName,
126  sal_Size quantum,
127  sal_Size quantum_cache_max,
128  rtl_arena_type * source_arena,
129  void * (SAL_CALL * source_alloc)(rtl_arena_type *, sal_Size *),
130  void (SAL_CALL * source_free) (rtl_arena_type *, void *, sal_Size),
131  int nFlags
133 
134 
142 SAL_DLLPUBLIC void SAL_CALL rtl_arena_destroy (
143  rtl_arena_type * pArena
145 
146 
156 SAL_DLLPUBLIC void * SAL_CALL rtl_arena_alloc (
157  rtl_arena_type * pArena,
158  sal_Size * pBytes
160 
161 
172 SAL_DLLPUBLIC void SAL_CALL rtl_arena_free (
173  rtl_arena_type * pArena,
174  void * pAddr,
175  sal_Size nBytes
177 
178 
181 typedef struct rtl_cache_st rtl_cache_type;
182 
183 #define RTL_CACHE_NAME_LENGTH 31
184 
185 #define RTL_CACHE_FLAG_BULKDESTROY 1
186 
203  const char * pName,
204  sal_Size nObjSize,
205  sal_Size nObjAlign,
206  int (SAL_CALL * constructor)(void * pObj, void * pUserArg),
207  void (SAL_CALL * destructor) (void * pObj, void * pUserArg),
208  void (SAL_CALL * reclaim) (void * pUserArg),
209  void * pUserArg,
210  rtl_arena_type * pSource,
211  int nFlags
213 
214 
223 SAL_DLLPUBLIC void SAL_CALL rtl_cache_destroy (
224  rtl_cache_type * pCache
226 
227 
234 SAL_DLLPUBLIC void * SAL_CALL rtl_cache_alloc (
235  rtl_cache_type * pCache
237 
238 
248 SAL_DLLPUBLIC void SAL_CALL rtl_cache_free (
249  rtl_cache_type * pCache,
250  void * pObj
252 
253 
254 #ifdef __cplusplus
255 }
256 #endif
257 
258 #endif /*_RTL_ALLOC_H_ */
259 
260 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */