Class CLocalMemMgr#
Defined in File localmemmgr.h
Inheritance Relationships#
Base Types#
public sdv::core::IMemoryAlloc
(Struct IMemoryAlloc)public sdv::IInterfaceAccess
(Struct IInterfaceAccess)public sdv::internal::IInternalMemAlloc
Class Documentation#
-
class CLocalMemMgr : public sdv::core::IMemoryAlloc, public sdv::IInterfaceAccess, public sdv::internal::IInternalMemAlloc#
Local memory manager class allowing the use of the SDV support classes without having to start the framework.
- Attention
Do not use the local memory manager together with the framework’s memory manager.
Public Functions
-
inline CLocalMemMgr()#
Constructor assigning this class to the local services.
-
inline ~CLocalMemMgr()#
Destructor removing this class from the local services.
-
inline virtual sdv::pointer<uint8_t> Allocate(uint32_t uiLength) override#
Allocate a memory block of the provided length. Overload of sdv::core::IMemoryAlloc::Allocate.
- Parameters:
uiLength – [in] The length of the memory block to allocate.
- Returns:
Smart pointer to the allocated memory or NULL when memory allocation was not possible.
Protected Functions
-
inline virtual void *Alloc(size_t nSize) override#
Allocate memory. Overload of sdv::internal::IInternalMemAlloc::Alloc.
- Parameters:
nSize – [in] The size of the memory to allocate (in bytes).
- Returns:
Pointer to the memory allocation or NULL when memory allocation failed.
-
inline virtual void *Realloc(void *pData, size_t nSize) override#
Reallocate memory. Overload of sdv::internal::IInternalMemAlloc::Realloc.
- Parameters:
pData – [in] Pointer to a previous allocation or NULL when no previous allocation was available.
nSize – [in] The size of the memory to allocate (in bytes).
- Returns:
Pointer to the memory allocation or NULL when memory allocation failed.
-
inline virtual void Free(void *pData) override#
Free a memory allocation. Overload of sdv::internal::IInternalMemAlloc::Free.
- Parameters:
pData – [in] Pointer to a previous allocation.