CookMem
1.4.0
A C++ memory context / allocator
Loading...
Searching...
No Matches
config.h
1
/*
2
* Copyright (c) 2021-2026 Heng Yuan
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*/
16
#ifndef COOK_MEM_CONFIG_H
17
#define COOK_MEM_CONFIG_H
18
19
#include <cstddef>
20
#include <cstdint>
21
22
#include "
version.h
"
23
27
namespace
cookmem
28
{
29
36
const
std::size_t
ALLOCATION_ALIGNMENT
=
sizeof
(std::size_t) * 2;
37
41
const
std::size_t
DEFAULT_TRIM_EMPTY_SEGMENTS_INTERVAL
= 4095;
46
const
std::size_t
DEFAULT_IMMEDIATE_RELEASE_THRESHOLD
= 256 * 1024;
52
const
std::size_t
DEFAULT_MIN_SEGMENT_SIZE
= 65536;
56
const
std::uint8_t
DEFAULT_PADDING_SIZE
= 0;
60
const
std::uint8_t
MAX_PADDING_SIZE
= 8;
64
const
char
DEFAULT_PADDING_BYTE
= (
char
)0xcd;
65
66
}
// namespace cookmem
67
68
#ifndef COOKMEM_DEBUG
69
#define COOKMEM_DEBUG 0
70
#endif
// COOKMEM_DEBUG
71
72
#endif
// COOK_MEM_CONFIG_H
cookmem::MemContextProvider
Definition
allocator.h:39
cookmem
Definition
allocator.h:29
cookmem::DEFAULT_PADDING_BYTE
const char DEFAULT_PADDING_BYTE
Definition
config.h:64
cookmem::DEFAULT_IMMEDIATE_RELEASE_THRESHOLD
const std::size_t DEFAULT_IMMEDIATE_RELEASE_THRESHOLD
Definition
config.h:46
cookmem::DEFAULT_TRIM_EMPTY_SEGMENTS_INTERVAL
const std::size_t DEFAULT_TRIM_EMPTY_SEGMENTS_INTERVAL
Definition
config.h:41
cookmem::DEFAULT_PADDING_SIZE
const std::uint8_t DEFAULT_PADDING_SIZE
Definition
config.h:56
cookmem::MAX_PADDING_SIZE
const std::uint8_t MAX_PADDING_SIZE
Definition
config.h:60
cookmem::DEFAULT_MIN_SEGMENT_SIZE
const std::size_t DEFAULT_MIN_SEGMENT_SIZE
Definition
config.h:52
cookmem::ALLOCATION_ALIGNMENT
const std::size_t ALLOCATION_ALIGNMENT
Definition
config.h:36
version.h
include
cookmem
config.h
Generated by
1.9.8