MeVisLab Toolbox Reference
mlMemoryManager.h File Reference
#include <iosfwd>
#include <string>
#include "../mlMemoryManagerDllExport.h"
#include "mlDeleteMemoryBlockCallback.h"
#include "mlMemoryBlockHandle.h"
#include "mlWeakMemoryBlockHandle.h"

Go to the source code of this file.

Classes

class  MLMemoryManager
 The memory manager. More...
 

Namespaces

 boost
 Forward declaration for the boost::mutex class.
 

Macros

#define ML_BYTE_TO_KB(x)   ((x) >> 10)
 
#define ML_BYTE_TO_MB(x)   ((x) >> 20)
 Converts the value from byte to megabyte. More...
 
#define ML_BYTE_TO_GB(x)   ((x) >> 30)
 Converts the value from byte to gigabyte. More...
 
#define ML_KB_TO_BYTE(x)   ((x) << 10)
 Converts the value from kilobyte to byte. More...
 
#define ML_MB_TO_BYTE(x)   ((x) << 20)
 Converts the value from megabyte to byte. More...
 
#define ML_GB_TO_BYTE(x)   ((x) << 30)
 Converts the value from gigabyte to byte. More...
 

Typedefs

typedef void(* MLMemoryManagerErrorHandler) (const std::string &message, const char *file, int line, MLMemoryManagerErrorHandlingType errorHandling)
 Function callback to handle memory manager errors. More...
 

Enumerations

enum  MLMemoryManagerErrorHandlingType { NotifyUser , Abort }
 This enum is passed to the memory manager error handler callback to request a certain error handling. More...
 

Functions

MLMEMORYMANAGER_EXPORT std::string mlByteToHumanReadable (size_t byte)
 Converts the byte value into a string with human readable format. More...
 

Typedef Documentation

◆ MLMemoryManagerErrorHandler

typedef void(* MLMemoryManagerErrorHandler) (const std::string &message, const char *file, int line, MLMemoryManagerErrorHandlingType errorHandling)

Function callback to handle memory manager errors.

Definition at line 81 of file mlMemoryManager.h.

Enumeration Type Documentation

◆ MLMemoryManagerErrorHandlingType

This enum is passed to the memory manager error handler callback to request a certain error handling.

Enumerator
NotifyUser 

An error occurred and the user should be notified about it.

Abort 

The error handling requests programm termination, because it is in an unstable state.

Definition at line 69 of file mlMemoryManager.h.

Function Documentation

◆ mlByteToHumanReadable()

MLMEMORYMANAGER_EXPORT std::string mlByteToHumanReadable ( size_t  byte)

Converts the byte value into a string with human readable format.

For example, 1075843119 results in "1GB 20MB 36KB 457B".