Flow-IPC 3.0.0
Flow-IPC project: Full implementation reference.
jemalloc.hpp
Go to the documentation of this file.
1/* Flow-IPC: SHM-jemalloc
2 * Copyright (c) 2023 Akamai Technologies, Inc.; and other contributors.
3 * Each commit is copyright by its respective author or author's employer.
4 *
5 * Licensed under the MIT License:
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining a copy
8 * of this software and associated documentation files (the "Software"), to deal
9 * in the Software without restriction, including without limitation the rights
10 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 * copies of the Software, and to permit persons to whom the Software is
12 * furnished to do so, subject to the following conditions:
13 *
14 * The above copyright notice and this permission notice shall be included in
15 * all copies or substantial portions of the Software.
16 *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 * THE SOFTWARE. */
24
25/// @file
26#pragma once
27
32#include "ipc/shm/shm.hpp"
35
36namespace ipc::shm
37{
38
39/// Implementation of #Arena_to_borrower_allocator_arena_t for SHM-jemalloc arenas.
40template<>
41struct Arena_to_borrower_allocator_arena<arena_lend::jemalloc::Ipc_arena>
42{
43 /**
44 * Implementation of `Arena_to_borrower_allocator_arena_t`; for SHM-jemalloc the `Arena` and
45 * `Borrower_allocator_arena` are different types, and in common use there is no relevant *object*
46 * of the latter; only the type matters.
47 */
48 using Type
52};
53
54} // namespace ipc::shm
When borrowing STL-compliant in-SHM data structures, use this type as the Arena template parameter to...
Represents/manages a segregated collection of in-SHM (shared memory) objects and buffers allocated us...
Definition: ipc_arena.hpp:177
Modules for SHared Memory (SHM) support.
Implementation of Arena_to_borrower_allocator_arena_t.
Definition: shm.hpp:36