haiku/headers
Michael Lotz 5c4d1c5e21 Complete rework of the heap implementation. Freelists are now part of the pages
and pages are now kept in lists as well. This allows to return free pages once
a bin does not need them anymore. Partially filled pages are kept in a sorted
linked list so that allocation will always happen on the fullest page - this
favours having full pages and makes it more likely lightly used pages will get
completely empty so they can be returned. Generally this now goes more in the
direction of a slab allocator.
The allocation logic has been extracted, so a heap is now simply attachable to
a region of memory. This allows for multiple heaps and for dynamic growing. In
case the allocator runs out of free pages, an asynchronous growing thread is
notified to create a new area and attach a new heap to it.
By default the kernel heap is now set to 16MB and grows by 8MB each time all
heaps run full.
This should solve quite a few issues, like certain bins just claiming all pages
so that even if there is free space nothing can be allocated. Also it obviously
does aways with filling the heap page by page until it overgrows.
I think this is now a well performing and scalable allocator we can live with
for quite some time. It is well tested under emulation and real hardware and
performs as expected. If problems come up there is an extensive sanity checker
that can be enabled by PARANOID_VALIDATION that covers most aspects of the
allocator. For normal operation this is not necessary though and is therefore
disabled by default.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23939 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-10 21:00:13 +00:00
..
build * Added B_NOT_SUPPORTED, B_KERNEL_READ_AREA, and B_KERNEL_WRITE_AREA to 2008-02-02 12:18:55 +00:00
compatibility/bsd * Added BSD specific errno.h for EDOOFUS (yeah, I know, great error code...) 2008-02-03 16:20:16 +00:00
cpp GCC 4 fix. 2005-12-11 16:22:51 +00:00
glibc Merged changes from branch build_system_redesign at revision 14573. 2005-10-29 16:27:43 +00:00
gnu adding gnu/termcap.h : is a copy of src/libs/termcap/termcap.h 2004-06-01 12:38:47 +00:00
legacy/network setsockopt and getsockopt use int as others functions 2006-06-23 14:19:11 +00:00
libs Added libalm.so and its dependency liblinprog.so. libalm.so provides a 2008-02-06 10:51:44 +00:00
os declared entry_ref 2008-02-08 21:37:25 +00:00
posix * Added gcvt() implementation - this fixes bug #1757. 2008-02-06 17:11:02 +00:00
private Complete rework of the heap implementation. Freelists are now part of the pages 2008-02-10 21:00:13 +00:00
tools Fixed the build of the cppunit stuff; if you are using IMPORT/EXPORT you should 2004-05-05 16:19:03 +00:00