LibreOffice
LibreOffice 5.0 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
82
SAL_DLLPUBLIC
void
* SAL_CALL
rtl_allocateZeroMemory
(
83
sal_Size Bytes
84
)
SAL_THROW_EXTERN_C
();
85
95
SAL_DLLPUBLIC
void
SAL_CALL
rtl_secureZeroMemory
(
96
void
* Ptr,
97
sal_Size Bytes
98
)
SAL_THROW_EXTERN_C
();
99
100
107
SAL_DLLPUBLIC
void
SAL_CALL
rtl_freeZeroMemory
(
108
void
* Ptr,
109
sal_Size Bytes
110
)
SAL_THROW_EXTERN_C
();
111
127
SAL_DLLPUBLIC
void
* SAL_CALL
rtl_allocateAlignedMemory
(
128
sal_Size Alignment,
129
sal_Size Bytes
130
)
SAL_THROW_EXTERN_C
();
131
132
140
SAL_DLLPUBLIC
void
SAL_CALL
rtl_freeAlignedMemory
(
141
void
* Ptr
142
)
SAL_THROW_EXTERN_C
();
143
144
147
typedef
struct
SAL_DLLPUBLIC_RTTI rtl_arena_st
rtl_arena_type
;
148
149
#define RTL_ARENA_NAME_LENGTH 31
150
151
166
SAL_DLLPUBLIC
rtl_arena_type
* SAL_CALL
rtl_arena_create
(
167
const
char
* pName,
168
sal_Size quantum,
169
sal_Size quantum_cache_max,
170
rtl_arena_type
* source_arena,
171
void
* (SAL_CALL * source_alloc)(
rtl_arena_type
*, sal_Size *),
172
void
(SAL_CALL * source_free) (
rtl_arena_type
*,
void
*, sal_Size),
173
int
nFlags
174
)
SAL_THROW_EXTERN_C
();
175
176
184
SAL_DLLPUBLIC
void
SAL_CALL
rtl_arena_destroy
(
185
rtl_arena_type
* pArena
186
)
SAL_THROW_EXTERN_C
();
187
188
198
SAL_DLLPUBLIC
void
* SAL_CALL
rtl_arena_alloc
(
199
rtl_arena_type
* pArena,
200
sal_Size * pBytes
201
)
SAL_THROW_EXTERN_C
();
202
203
214
SAL_DLLPUBLIC
void
SAL_CALL
rtl_arena_free
(
215
rtl_arena_type
* pArena,
216
void
* pAddr,
217
sal_Size nBytes
218
)
SAL_THROW_EXTERN_C
();
219
220
223
typedef
struct
rtl_cache_st
rtl_cache_type
;
224
225
#define RTL_CACHE_NAME_LENGTH 31
226
227
#define RTL_CACHE_FLAG_BULKDESTROY 1
228
245
SAL_DLLPUBLIC
rtl_cache_type
* SAL_CALL
rtl_cache_create
(
246
const
char
* pName,
247
sal_Size nObjSize,
248
sal_Size nObjAlign,
249
int
(SAL_CALL * constructor)(
void
* pObj,
void
* pUserArg),
250
void
(SAL_CALL * destructor) (
void
* pObj,
void
* pUserArg),
251
void
(SAL_CALL * reclaim) (
void
* pUserArg),
252
void
* pUserArg,
253
rtl_arena_type
* pSource,
254
int
nFlags
255
)
SAL_THROW_EXTERN_C
();
256
257
266
SAL_DLLPUBLIC
void
SAL_CALL
rtl_cache_destroy
(
267
rtl_cache_type
* pCache
268
)
SAL_THROW_EXTERN_C
();
269
270
277
SAL_DLLPUBLIC
void
* SAL_CALL
rtl_cache_alloc
(
278
rtl_cache_type
* pCache
279
)
SAL_THROW_EXTERN_C
();
280
281
291
SAL_DLLPUBLIC
void
SAL_CALL
rtl_cache_free
(
292
rtl_cache_type
* pCache,
293
void
* pObj
294
)
SAL_THROW_EXTERN_C
();
295
296
297
#ifdef __cplusplus
298
}
299
#endif
300
301
#endif // INCLUDED_RTL_ALLOC_H
302
303
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Generated by
1.8.4