LibreOffice
LibreOffice 4.4 SDK C/C++ API Reference
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
rtl
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
* This file is part of the LibreOffice project.
4
*
5
* This Source Code Form is subject to the terms of the Mozilla Public
6
* License, v. 2.0. If a copy of the MPL was not distributed with this
7
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
8
*
9
* This file incorporates work covered by the following license notice:
10
*
11
* Licensed to the Apache Software Foundation (ASF) under one or more
12
* contributor license agreements. See the NOTICE file distributed
13
* with this work for additional information regarding copyright
14
* ownership. The ASF licenses this file to you under the Apache
15
* License, Version 2.0 (the "License"); you may not use this file
16
* except in compliance with the License. You may obtain a copy of
17
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
18
*/
19
20
#ifndef INCLUDED_RTL_ALLOC_H
21
#define INCLUDED_RTL_ALLOC_H
22
23
#include <
sal/config.h
>
24
25
#include <
sal/saldllapi.h
>
26
#include <
sal/types.h
>
27
28
#ifdef __cplusplus
29
extern
"C"
{
30
#endif
31
32
41
SAL_DLLPUBLIC
void
* SAL_CALL
rtl_allocateMemory
(
42
sal_Size Bytes
43
)
SAL_THROW_EXTERN_C
();
44
45
60
SAL_DLLPUBLIC
void
* SAL_CALL
rtl_reallocateMemory
(
61
void
* Ptr,
62
sal_Size Bytes
63
)
SAL_THROW_EXTERN_C
();
64
65
70
SAL_DLLPUBLIC
void
SAL_CALL
rtl_freeMemory
(
71
void
* Ptr
72
)
SAL_THROW_EXTERN_C
();
73
74
83
SAL_DLLPUBLIC
void
* SAL_CALL
rtl_allocateZeroMemory
(
84
sal_Size Bytes
85
)
SAL_THROW_EXTERN_C
();
86
87
93
SAL_DLLPUBLIC
void
SAL_CALL
rtl_freeZeroMemory
(
94
void
* Ptr,
95
sal_Size Bytes
96
)
SAL_THROW_EXTERN_C
();
97
98
114
SAL_DLLPUBLIC
void
* SAL_CALL
rtl_allocateAlignedMemory
(
115
sal_Size Alignment,
116
sal_Size Bytes
117
)
SAL_THROW_EXTERN_C
();
118
119
127
SAL_DLLPUBLIC
void
SAL_CALL
rtl_freeAlignedMemory
(
128
void
* Ptr
129
)
SAL_THROW_EXTERN_C
();
130
131
134
typedef
struct
rtl_arena_st
rtl_arena_type
;
135
136
#define RTL_ARENA_NAME_LENGTH 31
137
138
153
SAL_DLLPUBLIC
rtl_arena_type
* SAL_CALL
rtl_arena_create
(
154
const
char
* pName,
155
sal_Size quantum,
156
sal_Size quantum_cache_max,
157
rtl_arena_type
* source_arena,
158
void
* (SAL_CALL * source_alloc)(
rtl_arena_type
*, sal_Size *),
159
void
(SAL_CALL * source_free) (
rtl_arena_type
*,
void
*, sal_Size),
160
int
nFlags
161
)
SAL_THROW_EXTERN_C
();
162
163
171
SAL_DLLPUBLIC
void
SAL_CALL
rtl_arena_destroy
(
172
rtl_arena_type
* pArena
173
)
SAL_THROW_EXTERN_C
();
174
175
185
SAL_DLLPUBLIC
void
* SAL_CALL
rtl_arena_alloc
(
186
rtl_arena_type
* pArena,
187
sal_Size * pBytes
188
)
SAL_THROW_EXTERN_C
();
189
190
201
SAL_DLLPUBLIC
void
SAL_CALL
rtl_arena_free
(
202
rtl_arena_type
* pArena,
203
void
* pAddr,
204
sal_Size nBytes
205
)
SAL_THROW_EXTERN_C
();
206
207
210
typedef
struct
rtl_cache_st
rtl_cache_type
;
211
212
#define RTL_CACHE_NAME_LENGTH 31
213
214
#define RTL_CACHE_FLAG_BULKDESTROY 1
215
232
SAL_DLLPUBLIC
rtl_cache_type
* SAL_CALL
rtl_cache_create
(
233
const
char
* pName,
234
sal_Size nObjSize,
235
sal_Size nObjAlign,
236
int
(SAL_CALL * constructor)(
void
* pObj,
void
* pUserArg),
237
void
(SAL_CALL * destructor) (
void
* pObj,
void
* pUserArg),
238
void
(SAL_CALL * reclaim) (
void
* pUserArg),
239
void
* pUserArg,
240
rtl_arena_type
* pSource,
241
int
nFlags
242
)
SAL_THROW_EXTERN_C
();
243
244
253
SAL_DLLPUBLIC
void
SAL_CALL
rtl_cache_destroy
(
254
rtl_cache_type
* pCache
255
)
SAL_THROW_EXTERN_C
();
256
257
264
SAL_DLLPUBLIC
void
* SAL_CALL
rtl_cache_alloc
(
265
rtl_cache_type
* pCache
266
)
SAL_THROW_EXTERN_C
();
267
268
278
SAL_DLLPUBLIC
void
SAL_CALL
rtl_cache_free
(
279
rtl_cache_type
* pCache,
280
void
* pObj
281
)
SAL_THROW_EXTERN_C
();
282
283
284
#ifdef __cplusplus
285
}
286
#endif
287
288
#endif // INCLUDED_RTL_ALLOC_H
289
290
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Generated on Thu Oct 1 2015 21:39:50 for LibreOffice by
1.8.4