Rev 1757 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 1757 | Rev 1760 | ||
|---|---|---|---|
| Line 103... | Line 103... | ||
| 103 | allocate = false; |
103 | allocate = false; |
| 104 | break; |
104 | break; |
| 105 | } |
105 | } |
| 106 | } |
106 | } |
| 107 | if (allocate) { |
107 | if (allocate) { |
| 108 | frame = PFN2ADDR(frame_alloc(ONE_FRAME, 0)); |
108 | frame = (__address) frame_alloc(ONE_FRAME, 0); |
| 109 | memsetb(PA2KA(frame), FRAME_SIZE, 0); |
109 | memsetb(PA2KA(frame), FRAME_SIZE, 0); |
| 110 | 110 | ||
| 111 | /* |
111 | /* |
| 112 | * Insert the address of the newly allocated frame to the pagemap. |
112 | * Insert the address of the newly allocated frame to the pagemap. |
| 113 | */ |
113 | */ |
| Line 130... | Line 130... | ||
| 130 | * currently not implemented, would be frame |
130 | * currently not implemented, would be frame |
| 131 | * reuse; when this becomes a possibility, |
131 | * reuse; when this becomes a possibility, |
| 132 | * do not forget to distinguish between |
132 | * do not forget to distinguish between |
| 133 | * the different causes |
133 | * the different causes |
| 134 | */ |
134 | */ |
| 135 | frame = PFN2ADDR(frame_alloc(ONE_FRAME, 0)); |
135 | frame = (__address)frame_alloc(ONE_FRAME, 0); |
| 136 | memsetb(PA2KA(frame), FRAME_SIZE, 0); |
136 | memsetb(PA2KA(frame), FRAME_SIZE, 0); |
| 137 | } |
137 | } |
| 138 | 138 | ||
| 139 | /* |
139 | /* |
| 140 | * Map 'page' to 'frame'. |
140 | * Map 'page' to 'frame'. |
| Line 156... | Line 156... | ||
| 156 | * @param page Ignored. |
156 | * @param page Ignored. |
| 157 | * @param frame Frame to be released. |
157 | * @param frame Frame to be released. |
| 158 | */ |
158 | */ |
| 159 | void anon_frame_free(as_area_t *area, __address page, __address frame) |
159 | void anon_frame_free(as_area_t *area, __address page, __address frame) |
| 160 | { |
160 | { |
| 161 | frame_free(ADDR2PFN(frame)); |
161 | frame_free(frame); |
| 162 | } |
162 | } |
| 163 | 163 | ||
| 164 | /** Share the anonymous address space area. |
164 | /** Share the anonymous address space area. |
| 165 | * |
165 | * |
| 166 | * Sharing of anonymous area is done by duplicating its entire mapping |
166 | * Sharing of anonymous area is done by duplicating its entire mapping |