Generated on Tue Feb 11 2025 17:33:26 for Gecode by doxygen 1.12.0

Default memory allocator. More...

#include <allocator.hpp>

Public Member Functions

 Allocator (void)
 Default constructor.
 
void * alloc (size_t n)
 Allocate memory block of size n.
 
void * realloc (void *p, size_t n)
 Return address of reallocated memory block p of size n.
 
void free (void *p)
 Free memory block p.
 
void * memcpy (void *d, const void *s, size_t n)
 Copy n bytes from source s directly to d and returns d.
 

Detailed Description

Default memory allocator.

Acts as a wrapper around memory allocation functionality.

Can be disabled by giving a "-disable-allocator" option to configure and the be re-implemented before including any other Gecode header.

Definition at line 60 of file allocator.hpp.

Constructor & Destructor Documentation

◆ Allocator()

Gecode::Support::Allocator::Allocator ( void )
inline

Default constructor.

Definition at line 76 of file allocator.hpp.

Member Function Documentation

◆ alloc()

void * Gecode::Support::Allocator::alloc ( size_t n)
inline

Allocate memory block of size n.

Definition at line 79 of file allocator.hpp.

◆ realloc()

void * Gecode::Support::Allocator::realloc ( void * p,
size_t n )
inline

Return address of reallocated memory block p of size n.

Definition at line 83 of file allocator.hpp.

◆ free()

void Gecode::Support::Allocator::free ( void * p)
inline

Free memory block p.

Definition at line 87 of file allocator.hpp.

◆ memcpy()

void * Gecode::Support::Allocator::memcpy ( void * d,
const void * s,
size_t n )
inline

Copy n bytes from source s directly to d and returns d.

Definition at line 91 of file allocator.hpp.


The documentation for this class was generated from the following file: