kernel - Revamp subr_alist and get it ready for use
authorMatthew Dillon <dillon@apollo.backplane.com>
Sat, 19 Nov 2011 04:57:16 +0000 (20:57 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sat, 19 Nov 2011 04:57:16 +0000 (20:57 -0800)
commit7552e9eef6eb8f0961f48246048d0983de799206
tree4ab2909e29c9d5b298161506f9b36fe32d4ef8c8
parent84ecccb4cfc1af809c2a1b49edff92376ea38867
kernel - Revamp subr_alist and get it ready for use

* Fix numerous bugs in the bighint code.

* Add API functions to allow static initialization.

* When shortcutting chunks we still should flesh out the parent's whole
  array.  This makes alist_free_info() easier to implement.

* Implement alist_free_info() which provides information on the largest
  trailing chunk available (with some restrictions).  This is used to
  chop down a large preinitialization.

* Implement an allocate-after-block feature to alist_alloc()

* Implement natural alignment and boundary handling.  Allocations can only
  be in powers of 2 internally with odd-sized allocations allocating the
  larger size and then piecemeal-freeing the trailing portion.  This also
  has the effect of ensuring that the boundary and alignment will always
  be the nearest greater or equal power of 2 to the allocation request size.
sys/kern/subr_alist.c
sys/sys/alist.h