SLikeNet 0.1.3

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions | Variables
RakMemoryOverride.cpp File Reference
`#include "slikenet/memoryoverride.h"`
`#include "slikenet/assert.h"`
`#include <stdlib.h>`

Go to the source code of this file.

## Functions

void | DefaultOutOfMemoryHandler (const char *file, const long line)
void | SetMalloc (void *(*userFunction)(size_t size))
void | SetRealloc (void *(*userFunction)(void *p, size_t size))
void | SetFree (void(*userFunction)(void *p))
void | SetMalloc_Ex (void *(*userFunction)(size_t size, const char *file, unsigned int line))
void | SetRealloc_Ex (void *(*userFunction)(void *p, size_t size, const char *file, unsigned int line))
void | SetFree_Ex (void(*userFunction)(void *p, const char *file, unsigned int line))
void | SetNotifyOutOfMemory (void(*userFunction)(const char *file, const long line))
void | SetDLMallocMMap (void *(*userFunction)(size_t size))
void | SetDLMallocDirectMMap (void *(*userFunction)(size_t size))
void | SetDLMallocMUnmap (int(*userFunction)(void *ptr, size_t size))
void * | _DLMalloc (size_t size)
void * | _DLRealloc (void *p, size_t size)
void | _DLFree (void *p)
void * | _DLMalloc_Ex (size_t size, const char *file, unsigned int line)
void * | _DLRealloc_Ex (void *p, size_t size, const char *file, unsigned int line)
void | _DLFree_Ex (void *p, const char *file, unsigned int line)
void | UseRaknetFixedHeap (size_t initialCapacity, void *(*yourMMapFunction)(size_t size), void *(*yourDirectMMapFunction)(size_t size), int(*yourMUnmapFunction)(void *p, size_t size))
void | FreeRakNetFixedHeap (void)

## Variables

void *(* | rakMalloc )(size_t size) = SLNet::_RakMalloc
void *(* | rakRealloc )(void *p, size_t size) = SLNet::_RakRealloc
void(* | rakFree )(void *p) = SLNet::_RakFree
void *(* | rakMalloc_Ex )(size_t size, const char *file, unsigned int line) = SLNet::_RakMalloc_Ex
void *(* | rakRealloc_Ex )(void *p, size_t size, const char *file, unsigned int line) = SLNet::_RakRealloc_Ex
void(* | rakFree_Ex )(void *p, const char *file, unsigned int line) = SLNet::_RakFree_Ex
void(* | notifyOutOfMemory )(const char *file, const long line) =DefaultOutOfMemoryHandler
void *(* | dlMallocMMap )(size_t size) = SLNet::_DLMallocMMap
void *(* | dlMallocDirectMMap )(size_t size) = SLNet::_DLMallocDirectMMap
int(* | dlMallocMUnmap )(void *ptr, size_t size) = SLNet::_DLMallocMUnmap
void *(*)(size_t size) | GetMalloc ()
void *(*)(void *p, size_t size) | GetRealloc ()
void(*)(void *p) | GetFree ()
void *(*)(size_t size, const char *file, unsigned int line) | GetMalloc_Ex ()
void *(*)(void *p, size_t size, const char *file, unsigned int line) | GetRealloc_Ex ()
void(*)(void *p, const char *file, unsigned int line) | GetFree_Ex ()
void *(*)(size_t size) | GetDLMallocMMap ()
void *(*)(size_t size) | GetDLMallocDirectMMap ()
int(*)(void *ptr, size_t size) | GetDLMallocMUnmap ()

## Function Documentation

void _DLFree | ( | void * | p | ) |

Definition at line 278 of file RakMemoryOverride.cpp.

void _DLFree_Ex | ( | void * | p,
|  | const char * | file,
|  | unsigned int | line
| ) |  |

Definition at line 281 of file RakMemoryOverride.cpp.

void* _DLMalloc | ( | size_t | size | ) |

Definition at line 276 of file RakMemoryOverride.cpp.

void* _DLMalloc_Ex | ( | size_t | size,
|  | const char * | file,
|  | unsigned int | line
| ) |  |

Definition at line 279 of file RakMemoryOverride.cpp.

void* _DLRealloc | ( | void * | p,
|  | size_t | size
| ) |  |

Definition at line 277 of file RakMemoryOverride.cpp.

void* _DLRealloc_Ex | ( | void * | p,
|  | size_t | size,
|  | const char * | file,
|  | unsigned int | line
| ) |  |

Definition at line 280 of file RakMemoryOverride.cpp.

void DefaultOutOfMemoryHandler | ( | const char * | file,
|  | const long | line
| ) |  |

Definition at line 52 of file RakMemoryOverride.cpp.

References RakAssert.

void FreeRakNetFixedHeap | ( | void |  | ) |

Definition at line 293 of file RakMemoryOverride.cpp.

void SetDLMallocDirectMMap | ( | void *(*)(size_t size) | userFunction | ) |

Definition at line 102 of file RakMemoryOverride.cpp.

References dlMallocDirectMMap.

void SetDLMallocMMap | ( | void *(*)(size_t size) | userFunction | ) |

Definition at line 98 of file RakMemoryOverride.cpp.

References dlMallocMMap.

void SetDLMallocMUnmap | ( | int(*)(void *ptr, size_t size) | userFunction | ) |

Definition at line 106 of file RakMemoryOverride.cpp.

References dlMallocMUnmap.

void SetFree | ( | void(*)(void *p) | userFunction | ) |

Definition at line 78 of file RakMemoryOverride.cpp.

References rakFree.

void SetFree_Ex | ( | void(*)(void *p, const char *file, unsigned int line) | userFunction | ) |

Definition at line 90 of file RakMemoryOverride.cpp.

References rakFree_Ex.

void SetMalloc | ( | void *(*)(size_t size) | userFunction | ) |

Definition at line 70 of file RakMemoryOverride.cpp.

References rakMalloc.

void SetMalloc_Ex | ( | void *(*)(size_t size, const char *file, unsigned int line) | userFunction | ) |

Definition at line 82 of file RakMemoryOverride.cpp.

References rakMalloc_Ex.

void SetNotifyOutOfMemory | ( | void(*)(const char *file, const long line) | userFunction | ) |

Definition at line 94 of file RakMemoryOverride.cpp.

References notifyOutOfMemory.

void SetRealloc | ( | void *(*)(void *p, size_t size) | userFunction | ) |

Definition at line 74 of file RakMemoryOverride.cpp.

References rakRealloc.

void SetRealloc_Ex | ( | void *(*)(void *p, size_t size, const char *file, unsigned int line) | userFunction | ) |

Definition at line 86 of file RakMemoryOverride.cpp.

References rakRealloc_Ex.

void UseRaknetFixedHeap | ( | size_t | initialCapacity,
|  | void *(*)(size_t size) | yourMMapFunction,
|  | void *(*)(size_t size) | yourDirectMMapFunction,
|  | int(*)(void *p, size_t size) | yourMUnmapFunction
| ) |  |

Definition at line 283 of file RakMemoryOverride.cpp.

## Variable Documentation

void*(* dlMallocDirectMMap)(size_t size) = SLNet::_DLMallocDirectMMap

Definition at line 67 of file RakMemoryOverride.cpp.

Referenced by SetDLMallocDirectMMap().

void*(* dlMallocMMap)(size_t size) = SLNet::_DLMallocMMap

Definition at line 66 of file RakMemoryOverride.cpp.

Referenced by SetDLMallocMMap().

int(* dlMallocMUnmap)(void *ptr, size_t size) = SLNet::_DLMallocMUnmap

Definition at line 68 of file RakMemoryOverride.cpp.

Referenced by SetDLMallocMUnmap().

void*(*)(size_t size) GetDLMallocDirectMMap()

Definition at line 138 of file RakMemoryOverride.cpp.

void*(*)(size_t size) GetDLMallocMMap()

Definition at line 134 of file RakMemoryOverride.cpp.

int(*)(void* ptr, size_t size) GetDLMallocMUnmap()

Definition at line 142 of file RakMemoryOverride.cpp.

void(*)(void *p) GetFree()

Definition at line 118 of file RakMemoryOverride.cpp.

void(*)(void *p, const char *file, unsigned int line) GetFree_Ex()

Definition at line 130 of file RakMemoryOverride.cpp.

Referenced by SLNet::OP_DELETE(), and SLNet::OP_DELETE_ARRAY().

void*(*)(size_t size) GetMalloc()

Definition at line 110 of file RakMemoryOverride.cpp.

void*(*)(size_t size, const char *file, unsigned int line) GetMalloc_Ex()

Definition at line 122 of file RakMemoryOverride.cpp.

Referenced by SLNet::OP_NEW(), SLNet::OP_NEW_1(), SLNet::OP_NEW_2(), SLNet::OP_NEW_3(), SLNet::OP_NEW_4(), and SLNet::OP_NEW_ARRAY().

void*(*)(void *p, size_t size) GetRealloc()

Definition at line 114 of file RakMemoryOverride.cpp.

void*(*)(void *p, size_t size, const char *file, unsigned int line) GetRealloc_Ex()

Definition at line 126 of file RakMemoryOverride.cpp.

void(* notifyOutOfMemory)(const char *file, const long line) =DefaultOutOfMemoryHandler

Definition at line 65 of file RakMemoryOverride.cpp.

Referenced by SLNet::RakString::Assign(), SLNet::RakWString::operator+=(), SLNet::RakWString::operator=(), SLNet::ReliabilityLayer::Send(), SLNet::RakPeer::SendBuffered(), SLNet::RakPeer::SendBufferedList(), SLNet::PluginInterface2::SendListUnified(), and SetNotifyOutOfMemory().

void(* rakFree)(void *p) = SLNet::_RakFree

Definition at line 61 of file RakMemoryOverride.cpp.

Referenced by SetFree().

void(* rakFree_Ex)(void *p, const char *file, unsigned int line) = SLNet::_RakFree_Ex

Definition at line 64 of file RakMemoryOverride.cpp.

Referenced by SLNet::RakString::Assign(), DataStructures::Table::Cell::Cell(), DataStructures::ByteQueue::Clear(), DataStructures::MemoryPool< MemoryBlockType >::Clear(), DataStructures::Table::Cell::Clear(), SLNet::RakWString::Clear(), SLNet::CloudServer::CloudData::Clear(), SLNet::RakPeer::ClearBanList(), SLNet::RakPeer::ClearBufferedCommands(), SLNet::RakPeer::DeallocatePacket(), SLNet::PluginInterface2::DeallocPacketUnified(), SLNet::StringCompressor::DecodeString(), SLNet::RakWString::Deserialize(), SLNet::RakString::Free(), VariadicSQLParser::FreeArguments(), SLNet::HuffmanEncodingTree::FreeMemory(), SLNet::RakString::FreeMemoryNoMutex(), DataStructures::MemoryPool< MemoryBlockType >::InitPage(), SLNet::RakPeer::IsBanned(), DataStructures::Table::Cell::operator=(), SLNet::BitStream::ReadAlignedBytesSafeAlloc(), DataStructures::BytePool::Release(), DataStructures::MemoryPool< MemoryBlockType >::Release(), SLNet::RakPeer::RemoveFromBanList(), SLNet::RakPeer::RunUpdateCycle(), SLNet::RakPeer::SendBufferedList(), SLNet::RakPeer::SendImmediate(), SLNet::PluginInterface2::SendListUnified(), SLNet::RakWString::Serialize(), SetFree_Ex(), SLNet::BitStream::~BitStream(), SLNet::CloudServer::CloudData::~CloudData(), SLNet::RakWString::~RakWString(), SLNet::StringTable::~StringTable(), and SLNet::VariableListDeltaTracker::~VariableListDeltaTracker().

void*(* rakMalloc)(size_t size) = SLNet::_RakMalloc

Definition at line 59 of file RakMemoryOverride.cpp.

Referenced by SetMalloc().

void*(* rakMalloc_Ex)(size_t size, const char *file, unsigned int line) = SLNet::_RakMalloc_Ex

Definition at line 62 of file RakMemoryOverride.cpp.

Referenced by SLNet::BitStream::AddBitsAndReallocate(), SLNet::StringTable::AddString(), SLNet::RakPeer::AddToBanList(), DataStructures::BytePool::Allocate(), DataStructures::MemoryPool< MemoryBlockType >::Allocate(), SLNet::RakString::Allocate(), SLNet::PluginInterface2::AllocatePacketUnified(), SLNet::RakPeer::AllocPacket(), SLNet::BitStream::AssertCopyData(), Base64Encoding(), SLNet::BitStream::BitStream(), DataStructures::Table::Cell::Cell(), SLNet::BitStream::CopyData(), SLNet::StringCompressor::DecodeString(), SLNet::DataCompressor::DecompressAndAllocate(), SLNet::RakWString::Deserialize(), VariadicSQLParser::ExtractArguments(), DataStructures::MemoryPool< MemoryBlockType >::InitPage(), operator+(), SLNet::RakWString::operator+=(), SLNet::RakWString::operator=(), DataStructures::Table::Cell::operator=(), SLNet::BitStream::ReadAlignedBytesSafeAlloc(), SLNet::RakString::Realloc(), SLNet::RakPeer::SendBuffered(), SLNet::RakPeer::SendBufferedList(), SLNet::RakPeer::SendImmediate(), SLNet::PluginInterface2::SendListUnified(), SLNet::RakWString::Serialize(), DataStructures::Table::Cell::Set(), SetMalloc_Ex(), and SLNet::VariableListDeltaTracker::VariableLastValueNode::VariableLastValueNode().

void*(* rakRealloc)(void *p, size_t size) = SLNet::_RakRealloc

Definition at line 60 of file RakMemoryOverride.cpp.

Referenced by SetRealloc().

void*(* rakRealloc_Ex)(void *p, size_t size, const char *file, unsigned int line) = SLNet::_RakRealloc_Ex

Definition at line 63 of file RakMemoryOverride.cpp.

Referenced by SLNet::BitStream::AddBitsAndReallocate(), SLNet::RakString::Assign(), SLNet::RakWString::operator+=(), SLNet::RakString::Realloc(), SetRealloc_Ex(), DataStructures::ByteQueue::WriteBytes(), and SLNet::VariableListDeltaTracker::WriteVar().