virtmem
virtual memory library for Arduino
config.h File Reference

This header file contains several variables that can be used to customize virtmem. More...

#include <stdint.h>

Go to the source code of this file.

Classes

struct  virtmem::DefaultAllocProperties
 This struct contains default parameters for virtual memory pages. More...
 

Namespaces

 virtmem
 contains all code from virtmem
 

Macros

#define VIRTMEM_VIRT_ADDRESS_OPERATOR
 If defined, the "address of" operator (&) of VPtr will be overloaded to return a virtual pointer that has its own address wrapped. More...
 
#define VIRTMEM_DEFAULT_POOLSIZE   1024l * 1024l
 The default poolsize for allocators supporting a variable sized pool. More...
 
#define VIRTMEM_EXPLICIT   explicit
 Used for explicit conversion operators. More...
 
#define VIRTMEM_WRAP_CPOINTERS
 If defined, enable wrapping of regular pointers inside virtmem::VPtr. More...
 
#define VIRTMEM_CPP11
 Enabled if current platform enables C++11 support (e.g. Teensyduino, Arduino >=1.6.6)
 
#define VIRTMEM_TRACE_STATS
 If defined, several functions in the allocator will be defined that can be used to access statistics such as memory usage and page swaps. More...
 

Detailed Description

This header file contains several variables that can be used to customize virtmem.

Macro Definition Documentation

#define VIRTMEM_DEFAULT_POOLSIZE   1024l * 1024l

The default poolsize for allocators supporting a variable sized pool.

This value is used for variable sized allocators, such as SDVAlloc and SerialVAlloc.

#define VIRTMEM_EXPLICIT   explicit

Used for explicit conversion operators.

Officially only C++11 and later support this, but this seems to work for not too old gcc versions (>= 4.5) even if C++11 is not enabled. An empty definition will disable it.

#define VIRTMEM_TRACE_STATS

If defined, several functions in the allocator will be defined that can be used to access statistics such as memory usage and page swaps.

See also
Statistics functions
#define VIRTMEM_VIRT_ADDRESS_OPERATOR

If defined, the "address of" operator (&) of VPtr will be overloaded to return a virtual pointer that has its own address wrapped.

This is useful to allow double pointers, for example:

1 typedef virtmem::VPtr<int, SDVAlloc> vptrType;
2 vptrType vptr;
3 virtmem::VPtr<vptrType, SDVAlloc> vptrptr = &vptr;
#define VIRTMEM_WRAP_CPOINTERS

If defined, enable wrapping of regular pointers inside virtmem::VPtr.

See also
virtmem::VPtr::wrap