Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
packet_pool.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2017 Roc authors
3
*
4
* This Source Code Form is subject to the terms of the Mozilla Public
5
* License, v. 2.0. If a copy of the MPL was not distributed with this
6
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
7
*/
8
9
//! @file roc_packet/packet_pool.h
10
//! @brief Packet pool.
11
12
#ifndef ROC_PACKET_PACKET_POOL_H_
13
#define ROC_PACKET_PACKET_POOL_H_
14
15
#include "
roc_core/pool.h
"
16
#include "
roc_packet/packet.h
"
17
18
namespace
roc
{
19
namespace
packet {
20
21
//! Packet pool.
22
class
PacketPool
:
public
core::Pool
<Packet> {
23
public
:
24
//! Constructor.
25
PacketPool
(
core::IAllocator
& allocator,
bool
poison)
26
: core::
Pool
<
Packet
>(allocator, sizeof(
Packet
), poison) {
27
}
28
};
29
30
}
// namespace packet
31
}
// namespace roc
32
33
#endif
// ROC_PACKET_PACKET_POOL_H_
roc::core::IAllocator
Memory allocator interface.
Definition:
iallocator.h:23
roc::core::Pool
Pool.
Definition:
pool.h:35
roc::core::Pool< Packet >::Pool
Pool(IAllocator &allocator, size_t object_size, bool poison)
Initialization.
Definition:
pool.h:43
roc::packet::PacketPool
Packet pool.
Definition:
packet_pool.h:22
roc::packet::PacketPool::PacketPool
PacketPool(core::IAllocator &allocator, bool poison)
Constructor.
Definition:
packet_pool.h:25
roc::packet::Packet
Packet.
Definition:
packet.h:35
roc
Root namespace.
packet.h
Packet.
pool.h
Pool.
roc_packet
packet_pool.h
Generated by
1.9.1