Subversion Repositories HelenOS-historic

Rev

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

Rev 703 Rev 822
Line 63... Line 63...
63
 
63
 
64
Generic page hash table interface is deployed on 64-bit architectures without
64
Generic page hash table interface is deployed on 64-bit architectures without
65
implied hardware support for hierarchical page tables, i.e. ia64 and sparc64.
65
implied hardware support for hierarchical page tables, i.e. ia64 and sparc64.
66
There is only one global page hash table in the system shared by all address
66
There is only one global page hash table in the system shared by all address
67
spaces.
67
spaces.
-
 
68
 
-
 
69
2.1 General allocator
-
 
70
 
-
 
71
'malloc' function accepts flags as a second argument. The flags are directly
-
 
72
passed to the underlying frame_alloc function. 
-
 
73
 
-
 
74
1) If the flags parameter contains FRAME_ATOMIC, the allocator will not sleep.
-
 
75
   The allocator CAN return NULL, when memory is not directly available.
-
 
76
   The caller MUST check if NULL was not returned
-
 
77
 
-
 
78
2) If the flags parameter does not contain FRAME_ATOMIC, the allocator
-
 
79
   will never return NULL, but it CAN sleep indefinitely. The caller
-
 
80
   does not have to check the return value.
-
 
81
 
-
 
82
3) The maximum size that can be allocated using malloc is 128K
-
 
83
 
-
 
84
Rules 1) and 2) apply to slab_alloc as well. Using SLAB allocator
-
 
85
to allocate too large values is not recommended.
-
 
86