• 首頁
  • 文件
  • 下載
  • 狀態
  • 常見問題
  • 郵件列表
  • 應用程式
  • 外部鏈結
  • 版權
  • 志願者
  • 聯繫

類別:AllocationGroup

記憶體配置統一管理

類型 使用 成員 說明
建構子 public AllocationGroup(void)
解構子 public ~AllocationGroup(void)
資料 public long linkCount
資料 public AllocationLink * linkBlocks
資料 public AllocationLink * spareLinks
資料 public AllocationLink * allocations
函式 public virtual void * alloc (int size)
函式 public virtual void free (void * memory)
函式 public virtual void release (void)
函式 protected virtual AllocationLink * allocate (int count = 16 ,
AllocationLink * nextBlock = NULL ,
AllocationLink * nextSpare = NULL ) ;

C/C++定義

class AllocationGroup
{
  public:

    long             linkCount   ;
    AllocationLink * linkBlocks  ;
    AllocationLink * spareLinks  ;
    AllocationLink * allocations ;

    explicit AllocationGroup          (void) ;
    virtual ~AllocationGroup          (void) ;

    virtual void * alloc              (int size) ;
    virtual void   free               (void * memory) ;
    virtual void   release            (void) ; // Free all

  protected:

    virtual AllocationLink * allocate (int              count     = 16     ,
                                       AllocationLink * nextBlock = NULL   ,
                                       AllocationLink * nextSpare = NULL ) ;

};