Lines Matching +full:page +full:- +full:size

2 .\" ----------------------------------------------------------------------------
3 .\" "THE BEER-WARE LICENSE" (Revision 42):
6 .\" this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
7 .\" ----------------------------------------------------------------------------
20 .I page-directory
23 for each page we have control over.
33 This is a free page.
36 This is the first page in a (multi-)page allocation.
39 This is a subsequent page in a multi-page allocation.
44 A pointer to a structure describing a partitioned page.
53 When a request for storage comes in, it will be treated as a ``page''
54 allocation if it is bigger than half a page.
56 can satisfy the request is used. The first page gets set to
58 status. If more than that one page is needed, the rest of them get
60 status in the page-directory.
63 the pages will get added to the page-directory with status
68 page directory to MALLOC_FREE, and then traversing the free-pages list to
73 If the request is less than or equal to half of a page, its size will be
75 and if the request is less than some minimum size, it is rounded up to
76 that size.
78 These sub-page allocations are served from pages which are split up
79 into some number of equal size chunks.
84 describes the size of the chunks on this page, how many there are,
87 and numbers used to keep track of the stuff in the page.
89 For each size of sub-page allocation, the pginfo structures for the
92 the beginning of the page directory to make access fast.
94 To allocate a chunk of some size, the head of the list for the
95 corresponding size is examined, and a free chunk found. The number
96 of free chunks on that page is decreased by one and, if zero, the
99 To free a chunk, the page is derived from the pointer, the page table
100 for that page contains a pointer to the pginfo structure, where the
103 proper place on the list for this size of chunks.
104 If the count increases to match the number of chunks on the page, the
106 actual page itself is free(3)'ed too.
108 To be 100% correct performance-wise these lists should be ordered
109 according to the recent number of accesses to that page. This
111 of the list on every memory reference to keep it up-to-date.
114 thing performance-wise.
131 the page is actually the pginfo structure and deals with it accordingly.
143 and don't affect anything but swap-space usage.
145 The page directory is actually kept in a mmap(2)'ed piece of
147 would otherwise have to be handled when the page directory
152 First the pointer is masked to find the page. The page directory
154 case the pointer must point exactly at the page, or it can contain
168 If malloc fails to allocate storage, core-dump the process with
181 page heavily by eliminating unnecessary page-ins and page-outs of
190 is to leave things alone if the size of the allocation is still in
191 the same size-class.
212 time-overhead of the malloc, further improvements will have to
221 Malloc/Free can be a significant point of contention in multi-threaded
222 programs. Low-grain locking of the data-structures inside the
223 implementation should be implemented to avoid excessive spin-waiting.