Barracuda Application Server C/C++ Reference
NO
FixedSizeAllocator.h
1
/*
2
* ____ _________ __ _
3
* / __ \___ ____ _/ /_ __(_)___ ___ ___ / / ____ ____ _(_)____
4
* / /_/ / _ \/ __ `/ / / / / / __ `__ \/ _ \/ / / __ \/ __ `/ / ___/
5
* / _, _/ __/ /_/ / / / / / / / / / / / __/ /___/ /_/ / /_/ / / /__
6
* /_/ |_|\___/\__,_/_/ /_/ /_/_/ /_/ /_/\___/_____/\____/\__, /_/\___/
7
* /____/
8
*
9
* Barracuda Embedded Web-Server
10
****************************************************************************
11
* HEADER
12
*
13
* $Id: FixedSizeAllocator.h 4915 2021-12-01 18:26:55Z wini $
14
*
15
* COPYRIGHT: Real Time Logic LLC, 2005-2008
16
*
17
* This software is copyrighted by and is the sole property of Real
18
* Time Logic LLC. All rights, title, ownership, or other interests in
19
* the software remain the property of Real Time Logic LLC. This
20
* software may only be used in accordance with the terms and
21
* conditions stipulated in the corresponding license agreement under
22
* which the software has been supplied. Any unauthorized use,
23
* duplication, transmission, distribution, or disclosure of this
24
* software is expressly forbidden.
25
*
26
* This Copyright notice may not be removed or modified without prior
27
* written consent of Real Time Logic LLC.
28
*
29
* Real Time Logic LLC. reserves the right to modify this software
30
* without notice.
31
*
32
* http://www.realtimelogic.com
33
****************************************************************************
34
*
35
*/
36
37
#ifndef __FixedSizeAllocator_h
38
#define __FixedSizeAllocator_h
39
40
#include <BaServerLib.h>
41
#include <SingleList.h>
42
43
55
typedef
struct
FixedSizeAllocator
56
#ifdef __cplusplus
57
:
public
AllocatorIntf
58
{
59
FixedSizeAllocator
() {}
60
67
FixedSizeAllocator
(
void
* buffer,
size_t
bufSize,
size_t
blockSize);
68
69
#else
70
{
71
AllocatorIntf
super;
72
#endif
73
SingleList freeList;
74
size_t
blockSize;
75
}
FixedSizeAllocator
;
76
77
78
#ifdef __cplusplus
79
extern
"C"
{
80
#endif
81
BA_API
void
FixedSizeAllocator_constructor(
FixedSizeAllocator
* o,
82
void
* buffer,
83
size_t
bufSize,
84
size_t
blockSize);
85
#ifdef __cplusplus
86
}
87
inline
FixedSizeAllocator::FixedSizeAllocator(
void
* buffer,
88
size_t
bufSize,
89
size_t
blockSize) {
90
FixedSizeAllocator_constructor(
this
, buffer, bufSize, blockSize);
91
}
92
#endif
93
94
95
#endif
AllocatorIntf
Memory allocation and deallocation Interface class.
Definition:
AllocatorIntf.h:83
FixedSizeAllocator
This is a fixed size allocator implementation for the abstract interface class AllocatorIntf.
Definition:
FixedSizeAllocator.h:58
inc
FixedSizeAllocator.h
Barracuda Application Server
documentation generated on Sat May 21 2022 14:05:14