クラス sc_core::sc_byte_heap

#include <sc_temporary.h>

すべてのメンバ一覧

Public メソッド

char * allocate (int bytes_n)
void initialize (int heap_size=0x100000)
unsigned int length ()
 sc_byte_heap ()
 sc_byte_heap (int heap_size)
 ~sc_byte_heap ()

Public 変数

char * m_bgn_p
char * m_end_p
char * m_next_p


説明

sc_temporary.h87 行で定義されています。


コンストラクタとデストラクタ

sc_core::sc_byte_heap::sc_byte_heap (  )  [inline]

sc_temporary.h120 行で定義されています。

00121         {
00122                 m_bgn_p = 0;
00123         }

sc_core::sc_byte_heap::sc_byte_heap ( int  heap_size  )  [inline]

sc_temporary.h125 行で定義されています。

00126         {
00127                 m_bgn_p = 0;
00128                 initialize( heap_size );
00129         }

sc_core::sc_byte_heap::~sc_byte_heap (  )  [inline]

sc_temporary.h131 行で定義されています。

00132         {
00133                 if ( m_bgn_p ) delete [] m_bgn_p;
00134         }


関数

char* sc_core::sc_byte_heap::allocate ( int  bytes_n  )  [inline]

sc_temporary.h93 行で定義されています。

00094     {
00095         char*   result_p;
00096         bytes_n = (bytes_n + 7) & 0xfffffff8;
00097         result_p = m_next_p;
00098         m_next_p += bytes_n;
00099         if ( m_next_p >= m_end_p )
00100         {
00101             result_p = m_bgn_p;
00102             m_next_p = m_bgn_p + bytes_n;
00103         }
00104         return result_p; 
00105     }

void sc_core::sc_byte_heap::initialize ( int  heap_size = 0x100000  )  [inline]

sc_temporary.h107 行で定義されています。

00108     {
00109                 if ( m_bgn_p ) delete [] m_bgn_p;
00110         m_bgn_p = new char[heap_size];
00111         m_end_p = &m_bgn_p[heap_size];
00112         m_next_p = m_bgn_p;
00113     }

unsigned int sc_core::sc_byte_heap::length (  )  [inline]

sc_temporary.h115 行で定義されています。

00116         {
00117                 return (unsigned int)(m_end_p - m_bgn_p);
00118         }


変数

sc_temporary.h89 行で定義されています。

sc_temporary.h90 行で定義されています。

sc_temporary.h91 行で定義されています。


このクラスの説明は次のファイルから生成されました:

SystemCに対してFri Jun 6 20:12:24 2008に生成されました。  doxygen 1.5.6