ML Reference
MeVis/Foundation/Sources/MLMemoryManager/Include/mlMemoryManager.h File Reference

Overview documentation of the MLMemoryManager. More...

#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

namespace  boost
 

Forward declaration for the boost::mutex class.


Defines

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

Typedefs

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

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.

Detailed Description

Overview documentation of the MLMemoryManager.

Author:
Marcus Barann

Definition in file mlMemoryManager.h.


Typedef Documentation

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

Function callback to handle memory manager errors.

Definition at line 78 of file mlMemoryManager.h.


Enumeration Type Documentation

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 66 of file mlMemoryManager.h.


Function Documentation

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".