[BACK]Return to subr_pool.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / kern

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/kern/subr_pool.c between version 1.3 and 1.4

version 1.3, 1998/07/23 20:34:00 version 1.4, 1998/07/24 20:19:23
Line 321  pool_init(pp, size, align, ioff, flags, 
Line 321  pool_init(pp, size, align, ioff, flags, 
         if (!powerof2(pagesz) || pagesz > PAGE_SIZE)          if (!powerof2(pagesz) || pagesz > PAGE_SIZE)
                 panic("pool_init: page size invalid (%lx)\n", (u_long)pagesz);                  panic("pool_init: page size invalid (%lx)\n", (u_long)pagesz);
   
         if (alloc == NULL)          if (alloc == NULL && release == NULL) {
                 alloc = pool_page_alloc;                  alloc = pool_page_alloc;
   
         if (release == NULL)  
                 release = pool_page_free;                  release = pool_page_free;
                   pagesz = PAGE_SIZE;     /* Rounds to PAGE_SIZE anyhow. */
           } else if ((alloc != NULL && release != NULL) == 0) {
                   /* If you specifiy one, must specify both. */
                   panic("pool_init: must specify alloc and release together");
           }
   
         if (pagesz == 0)          if (pagesz == 0)
                 pagesz = PAGE_SIZE;                  pagesz = PAGE_SIZE;
   
Line 805  pool_page_alloc(sz, flags, mtype)
Line 808  pool_page_alloc(sz, flags, mtype)
         int flags;          int flags;
         int mtype;          int mtype;
 {  {
         vm_offset_t va;  
   
 #if defined(UVM)  #if defined(UVM)
         va = uvm_km_kmemalloc(kernel_map, uvm.kernel_object,          return ((void *)uvm_km_alloc_poolpage());
                               (vm_size_t)sz, UVM_KMF_NOWAIT);  #else
 #else          return ((void *)kmem_alloc_poolpage());
         va = kmem_malloc(kmem_map, (vm_size_t)sz, 0);  #endif
 #endif  
         return ((void *)va);  
 }  }
   
 static void  static void
Line 824  pool_page_free(v, sz, mtype)
Line 824  pool_page_free(v, sz, mtype)
 {  {
   
 #if defined(UVM)  #if defined(UVM)
         uvm_km_free(kernel_map, (vm_offset_t)v, sz);          uvm_km_free_poolpage((vm_offset_t)v);
 #else  #else
         kmem_free(kmem_map, (vm_offset_t)v, sz);          kmem_free_poolpage((vm_offset_t)v);
 #endif  #endif
 }  }
   

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

CVSweb <webmaster@jp.NetBSD.org>