/[svn]/ircd-hybrid-7.2/include/balloc.h
ViewVC logotype

Diff of /ircd-hybrid-7.2/include/balloc.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1006 by michael, Wed Nov 7 22:47:44 2007 UTC revision 1007 by michael, Tue Sep 1 15:25:26 2009 UTC
# Line 38  Line 38 
38  /*! \brief Block contains status information for  /*! \brief Block contains status information for
39   *         an allocated block in our heap.   *         an allocated block in our heap.
40   */   */
41  struct Block {  struct Block
42    {
43    int           freeElems;      /*!< Number of available elems */    int           freeElems;      /*!< Number of available elems */
44    size_t        alloc_size;     /*!< Size of data space for each block */    size_t        alloc_size;     /*!< Size of data space for each block */
45    struct Block* next;           /*!< Next in our chain of blocks */    struct Block* next;           /*!< Next in our chain of blocks */
# Line 48  struct Block { Line 49  struct Block {
49    
50  typedef struct Block Block;  typedef struct Block Block;
51    
52  struct MemBlock {  struct MemBlock
53    dlink_node self;              /*!< Node for linking into free_list or used_list */  {
54      dlink_node self;              /*!< Node for linking into free_list */
55    Block *block;                 /*!< Which block we belong to */    Block *block;                 /*!< Which block we belong to */
56  };  };
57  typedef struct MemBlock MemBlock;  typedef struct MemBlock MemBlock;
# Line 57  typedef struct MemBlock MemBlock; Line 59  typedef struct MemBlock MemBlock;
59  /*! \brief BlockHeap contains the information for the root node of the  /*! \brief BlockHeap contains the information for the root node of the
60   *         memory heap.   *         memory heap.
61   */   */
62  struct BlockHeap {  struct BlockHeap
63    {
64     size_t  elemSize;            /*!< Size of each element to be stored */     size_t  elemSize;            /*!< Size of each element to be stored */
65     int     elemsPerBlock;       /*!< Number of elements per block */     int     elemsPerBlock;       /*!< Number of elements per block */
66     int     blocksAllocated;     /*!< Number of blocks allocated */     int     blocksAllocated;     /*!< Number of blocks allocated */

Legend:
Removed from v.1006  
changed lines
  Added in v.1007

svnadmin@ircd-hybrid.org
ViewVC Help
Powered by ViewVC 1.1.26