Subversion Repositories HelenOS-historic

Rev

Rev 762 | Rev 766 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 762 Rev 764
Line 29... Line 29...
29
#ifndef __SLAB_H__
29
#ifndef __SLAB_H__
30
#define __SLAB_H__
30
#define __SLAB_H__
31
 
31
 
32
#include <list.h>
32
#include <list.h>
33
#include <synch/spinlock.h>
33
#include <synch/spinlock.h>
-
 
34
#include <arch/atomic.h>
34
 
35
 
35
/** Initial Magazine size (TODO: dynamically growing magazines) */
36
/** Initial Magazine size (TODO: dynamically growing magazines) */
36
#define SLAB_MAG_SIZE  4
37
#define SLAB_MAG_SIZE  4
37
 
38
 
38
/** If object size is less, store control structure inside SLAB */
39
/** If object size is less, store control structure inside SLAB */
Line 70... Line 71...
70
    /* Computed values */
71
    /* Computed values */
71
    __u8 order;        /**< Order of frames to be allocated */
72
    __u8 order;        /**< Order of frames to be allocated */
72
    int objects;      /**< Number of objects that fit in */
73
    int objects;      /**< Number of objects that fit in */
73
 
74
 
74
    /* Statistics */
75
    /* Statistics */
-
 
76
    atomic_t allocated_slabs;
-
 
77
    atomic_t allocated_objs;
75
 
78
 
76
    /* Slabs */
79
    /* Slabs */
77
    link_t full_slabs;     /**< List of full slabs */
80
    link_t full_slabs;     /**< List of full slabs */
78
    link_t partial_slabs;  /**< List of partial slabs */
81
    link_t partial_slabs;  /**< List of partial slabs */
79
    /* Magazines  */
82
    /* Magazines  */