cvs commit: src/sys/kern kern_malloc.c src/sys/sys malloc.h src/sys/vm memguard.c memguard.h

Pawel Jakub Dawidek pjd at
Fri Dec 30 03:45:08 PST 2005

pjd         2005-12-30 11:45:07 UTC

  FreeBSD src repository

  Modified files:
    sys/kern             kern_malloc.c 
    sys/sys              malloc.h 
    sys/vm               memguard.c memguard.h 
  Improve memguard a bit:
  - Provide tunable vm.memguard.desc, so one can specify memory type without
    changing the code and recompiling the kernel.
  - Allow to use memguard for kernel modules by providing sysctl
    vm.memguard.desc, which can be changed to short description of memory
    type before module is loaded.
  - Move as much memguard code as possible to memguard.c.
  - Add sysctl node vm.memguard. and move memguard-specific sysctl there.
  - Add malloc_desc2type() function for finding memory type based on its
    short description (ks_shortdesc field).
  - Memory type can be changed (via vm.memguard.desc sysctl) only if it
    doesn't exist (will be loaded later) or when no memory is allocated yet.
    If there is allocated memory for the given memory type, return EBUSY.
  - Implement two ways of memory types comparsion and make safer/slower the
  Revision  Changes    Path
  1.151     +17 -13    src/sys/kern/kern_malloc.c
  1.83      +2 -0      src/sys/sys/malloc.h
  1.6       +90 -0     src/sys/vm/memguard.c
  1.3       +3 -0      src/sys/vm/memguard.h

More information about the cvs-src mailing list