Sources Pipelines Documentation

Allocators  
null_allocator.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 <boost/memory/memory_block.hpp>
8 
9 #include <cstddef>
10 
11 
12 namespace boost { namespace memory {
13 
21 {
22 public:
29  memory_block allocate(std::size_t size = 0);
30 
36  void deallocate(memory_block& block);
37 
44  bool owns(memory_block& block);
45 };
46 
47 } }
48 
49 #include "null_allocator.ipp"
50 
void deallocate(memory_block &block)
bool owns(memory_block &block)
Checks if the given block is owned by this allocator.
Represents an allocated memory block.
memory_block allocate(std::size_t size=0)
An allocator acting as the last fallback allocator, allocating only nullptr.