scc  2022.4.0
SystemC components library
tlm::scc::tlm_mm< TYPES, CLEANUP_DATA > Class Template Reference

a tlm memory manager More...

#include <tlm_mm.h>

Inheritance diagram for tlm::scc::tlm_mm< TYPES, CLEANUP_DATA >:
Collaboration diagram for tlm::scc::tlm_mm< TYPES, CLEANUP_DATA >:

Public Member Functions

 tlm_mm (const tlm_mm &)=delete
 
 tlm_mm (tlm_mm &&)=delete
 
tlm_mmoperator= (const tlm_mm &other)=delete
 
tlm_mmoperator= (tlm_mm &&other)=delete
 
payload_type * allocate ()
 get a plain tlm_payload_type without extensions More...
 
template<typename PEXT >
payload_type * allocate ()
 get a tlm_payload_type with registered extension More...
 
payload_type * allocate (size_t sz, bool be=false)
 get a plain tlm_payload_type without extensions but initialized data and byte enable More...
 
template<typename PEXT >
payload_type * allocate (size_t sz, bool be=false)
 get a tlm_payload_type with registered extension and initialize data pointer More...
 
void free (tlm::tlm_generic_payload *trans) override
 return the extension into the memory pool (removing the extensions) More...
 

Static Public Member Functions

static tlm_mmget ()
 accessor function of the singleton More...
 

Detailed Description

template<typename TYPES = tlm_base_protocol_types, bool CLEANUP_DATA = true>
class tlm::scc::tlm_mm< TYPES, CLEANUP_DATA >

a tlm memory manager

This memory manager can be used as singleton or as local memory manager. It uses the pool_allocator as singleton to maximize reuse

Definition at line 161 of file tlm_mm.h.

Member Function Documentation

◆ allocate() [1/4]

template<typename TYPES , bool CLEANUP_DATA>
tlm_mm< TYPES, CLEANUP_DATA >::payload_type * tlm::scc::tlm_mm< TYPES, CLEANUP_DATA >::allocate
inline

get a plain tlm_payload_type without extensions

Returns
the tlm_payload_type

Definition at line 228 of file tlm_mm.h.

◆ allocate() [2/4]

template<typename TYPES = tlm_base_protocol_types, bool CLEANUP_DATA = true>
template<typename PEXT >
payload_type* tlm::scc::tlm_mm< TYPES, CLEANUP_DATA >::allocate ( )
inline

get a tlm_payload_type with registered extension

Returns
the tlm_payload_type

Definition at line 192 of file tlm_mm.h.

◆ allocate() [3/4]

template<typename TYPES , bool CLEANUP_DATA>
tlm_mm< TYPES, CLEANUP_DATA >::payload_type * tlm::scc::tlm_mm< TYPES, CLEANUP_DATA >::allocate ( size_t  sz,
bool  be = false 
)
inline

get a plain tlm_payload_type without extensions but initialized data and byte enable

Returns
the tlm_payload_type

Definition at line 234 of file tlm_mm.h.

◆ allocate() [4/4]

template<typename TYPES = tlm_base_protocol_types, bool CLEANUP_DATA = true>
template<typename PEXT >
payload_type* tlm::scc::tlm_mm< TYPES, CLEANUP_DATA >::allocate ( size_t  sz,
bool  be = false 
)
inline

get a tlm_payload_type with registered extension and initialize data pointer

Returns
the tlm_payload_type

Definition at line 207 of file tlm_mm.h.

◆ free()

template<typename TYPES , bool CLEANUP_DATA>
void tlm::scc::tlm_mm< TYPES, CLEANUP_DATA >::free ( tlm::tlm_generic_payload *  trans)
override

return the extension into the memory pool (removing the extensions)

Parameters
transthe returning transaction

Definition at line 238 of file tlm_mm.h.

◆ get()

template<typename TYPES , bool CLEANUP_DATA>
tlm_mm< TYPES, CLEANUP_DATA > & tlm::scc::tlm_mm< TYPES, CLEANUP_DATA >::get
inlinestatic

accessor function of the singleton

Returns

Definition at line 222 of file tlm_mm.h.


The documentation for this class was generated from the following file: