source: branches/ithildin-1.1/doc/heaps.txt @ 490

Revision 490, 1.1 KB checked in by wd, 8 years ago (diff)

Add Id/Rev? keywords.

  • Property svn:keywords set to Id Rev
Line 
1###############################################################################
2#
3# heaps.txt: documentation of the blockheap allocator.
4#
5# Copyright 2002 the Ithildin Project.
6# See the COPYING file for more information on licensing and use.
7#
8# $Id$
9#
10###############################################################################
11
12A simple description of the heap-allocation system:
13
14The heap allocator is a simple mechanism to prevent the cycle of malloc/free
15which often occurs when allocating items of the same size.  With a heap
16allocator, several items are allocated at once, and instead of returning the
17memory to the system, the memory is instead simply kept to be re-allocated
18later.  The system assumes that a lot of allocation and de-allocation will
19occur at once.
20
21The system uses a small/simple singly linked list within each heap to
22specify free memory.  The list takes up no additional memory, because the
23pointers are simply placed at the beginning of a free block in the heap,
24using the memory already allocated.  The list head does, of course, takes
25memory.  For more gory details, check out the actual code.
26
27
Note: See TracBrowser for help on using the repository browser.