    .     
,    .      
,          .
    ,     
.

     . ,   -  -
 ,    ,    
?

             
kmem_cache_destroy ().     
..

      ,    -
  .

    ,        -
 .

void * kmem cache alloc(kmem cache t *cachep, int flags)

       ,    -
 cachep.         ,   -
         
kmem_getpages (),   flags    _get_free_
pages ().    ,    .  , -
  GFP_KERNEL  GFP_ATOMIC.

        ,     -
,    .

void kmem_cache_free(kmem_cache_t *cachep, void *objp)

   ,     objp,  -
.

    

     ,     -
 task_struct ( ).     
      kernel/fork, .

    ,      
 task struct:

kmem_cache_t *task_struct_cachep;

   ,   fork_init (),    -
 .

task struct cachep = kmem cache create("task struct",

sizeof(struct task_struct),

ARCH_MIN_TASKALIGN,

SLAB_PANIC,

NULL,

NULL) ;

254                                                                     11