Allocators
Main Page
Classes
Files
File List
src
include
boost
memory
memory_block.hpp
1
// Copyright (c) 2016 Lukasz Laszko
2
//
3
// Distributed under the Boost Software License, Version 1.0. (See accompanying
4
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5
#pragma once
6
7
#include <cstddef>
8
#include <cstdint>
9
10
11
namespace
boost
{
namespace
memory {
12
20
struct
memory_block
21
{
25
void
*
address
;
26
30
std::size_t
size
;
31
37
inline
operator
std::uint8_t* ()
const
38
{
39
return
reinterpret_cast<
std::uint8_t*
>
(
address
);
40
}
41
48
inline
bool
operator==
(
const
memory_block
& other)
const
49
{
50
return
address == other.
address
&& size == other.
size
;
51
}
52
};
53
61
static
const
memory_block
null_block = {
nullptr
, 0ul };
62
63
} }
64
boost
Definition:
affix_allocator.hpp:13
boost::memory::memory_block::address
void * address
Definition:
memory_block.hpp:25
boost::memory::memory_block::size
std::size_t size
Block's size.
Definition:
memory_block.hpp:30
boost::memory::memory_block
Represents an allocated memory block.
Definition:
memory_block.hpp:20
boost::memory::memory_block::operator==
bool operator==(const memory_block &other) const
Checks if memory blocks are identical.
Definition:
memory_block.hpp:48
Generated by
1.8.11