7 #ifndef __FWMEMORY_BUFFERALLOCATIONPOLICY_HPP__ 8 #define __FWMEMORY_BUFFERALLOCATIONPOLICY_HPP__ 10 #include <fwCore/base.hpp> 12 #include "fwMemory/exception/Memory.hpp" 13 #include "fwMemory/config.hpp" 22 typedef size_t SizeType;
23 typedef void* BufferType;
25 FWMEMORY_API
virtual void allocate(BufferType &buffer, SizeType size) = 0;
26 FWMEMORY_API
virtual void reallocate(BufferType &buffer, SizeType size) = 0;
27 FWMEMORY_API
virtual void destroy(BufferType &buffer) = 0;
38 FWMEMORY_API
void allocate(BufferType &buffer,
39 BufferAllocationPolicy::SizeType size);
40 FWMEMORY_API
void reallocate(BufferType &buffer,
41 BufferAllocationPolicy::SizeType size);
42 FWMEMORY_API
void destroy(BufferType &buffer);
44 FWMEMORY_API
static BufferAllocationPolicy::sptr New();
51 FWMEMORY_API
void allocate(BufferType &buffer,
52 BufferAllocationPolicy::SizeType size);
53 FWMEMORY_API
void reallocate(BufferType &buffer,
54 BufferAllocationPolicy::SizeType size);
55 FWMEMORY_API
void destroy(BufferType &buffer);
57 FWMEMORY_API
static BufferAllocationPolicy::sptr New();
63 FWMEMORY_API
void allocate(BufferType &buffer,
64 BufferAllocationPolicy::SizeType size);
65 FWMEMORY_API
void reallocate(BufferType &buffer,
66 BufferAllocationPolicy::SizeType size);
67 FWMEMORY_API
void destroy(BufferType &buffer);
69 FWMEMORY_API
static BufferAllocationPolicy::sptr New();
The namespace fwMemory contains tools to manage memory. Use for dump.