Print this page
XXXX kmem: remove a check that's always false
It's been a very long time since this code ran on systems with less than
24MB RAM.

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/os/kmem.c
          +++ new/usr/src/uts/common/os/kmem.c
↓ open down ↓ 4327 lines elided ↑ open up ↑
4328 4328  kmem_init(void)
4329 4329  {
4330 4330          kmem_cache_t *cp;
4331 4331          int old_kmem_flags = kmem_flags;
4332 4332          int use_large_pages = 0;
4333 4333          size_t maxverify, minfirewall;
4334 4334  
4335 4335          kstat_init();
4336 4336  
4337 4337          /*
4338      -         * Small-memory systems (< 24 MB) can't handle kmem_flags overhead.
4339      -         */
4340      -        if (physmem < btop(24 << 20) && !(old_kmem_flags & KMF_STICKY))
4341      -                kmem_flags = 0;
4342      -
4343      -        /*
4344 4338           * Don't do firewalled allocations if the heap is less than 1TB
4345 4339           * (i.e. on a 32-bit kernel)
4346 4340           * The resulting VM_NEXTFIT allocations would create too much
4347 4341           * fragmentation in a small heap.
4348 4342           */
4349 4343  #if defined(_LP64)
4350 4344          maxverify = minfirewall = PAGESIZE / 2;
4351 4345  #else
4352 4346          maxverify = minfirewall = ULONG_MAX;
4353 4347  #endif
↓ open down ↓ 1241 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX