Subversion Repositories HelenOS-historic

Rev

Rev 489 | Rev 501 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 489 Rev 490
Line 38... Line 38...
38
 *
38
 *
39
 * Allocate memory for and initialize new buddy system.
39
 * Allocate memory for and initialize new buddy system.
40
 *
40
 *
41
 * @param max_order The biggest allocable size will be 2^max_order.
41
 * @param max_order The biggest allocable size will be 2^max_order.
42
 * @param op Operations for new buddy system.
42
 * @param op Operations for new buddy system.
43
 * @param data Pointer to be used by implentation.
43
 * @param data Pointer to be used by implementation.
44
 *
44
 *
45
 * @return New buddy system.
45
 * @return New buddy system.
46
 */
46
 */
47
buddy_system_t *buddy_system_create(__u8 max_order, buddy_system_operations_t *op, void *data)
47
buddy_system_t *buddy_system_create(__u8 max_order, buddy_system_operations_t *op, void *data)
48
{
48
{
Line 83... Line 83...
83
    return b;
83
    return b;
84
}
84
}
85
 
85
 
86
/** Allocate block from buddy system.
86
/** Allocate block from buddy system.
87
 *
87
 *
88
 * Allocate block from buddy system.
-
 
89
 *
-
 
90
 * @param b Buddy system pointer.
88
 * @param b Buddy system pointer.
91
 * @param i Returned block will be 2^i big.
89
 * @param i Returned block will be 2^i big.
92
 *
90
 *
93
 * @return Block of data represented by link_t.
91
 * @return Block of data represented by link_t.
94
 */
92
 */
Line 145... Line 143...
145
   
143
   
146
}
144
}
147
 
145
 
148
/** Return block to buddy system.
146
/** Return block to buddy system.
149
 *
147
 *
150
 * Return block to buddy system.
-
 
151
 *
-
 
152
 * @param b Buddy system pointer.
148
 * @param b Buddy system pointer.
153
 * @param block Block to return.
149
 * @param block Block to return.
154
 */
150
 */
155
void buddy_system_free(buddy_system_t *b, link_t *block)
151
void buddy_system_free(buddy_system_t *b, link_t *block)
156
{
152
{