Subversion Repositories HelenOS

Rev

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

Rev 704 Rev 711
Line 248... Line 248...
248
     * Decide if a frame needs to be allocated.
248
     * Decide if a frame needs to be allocated.
249
     * If so, allocate it and adjust area->mapping map.
249
     * If so, allocate it and adjust area->mapping map.
250
     */
250
     */
251
    if (area->mapping[vpn] == UNALLOCATED_PFN) {
251
    if (area->mapping[vpn] == UNALLOCATED_PFN) {
252
        frame = frame_alloc(0, ONE_FRAME, NULL);
252
        frame = frame_alloc(0, ONE_FRAME, NULL);
253
        memsetb(frame, FRAME_SIZE, 0);
253
        memsetb(PA2KA(frame), FRAME_SIZE, 0);
254
        area->mapping[vpn] = frame / FRAME_SIZE;
254
        area->mapping[vpn] = frame / FRAME_SIZE;
255
        ASSERT(area->mapping[vpn] != UNALLOCATED_PFN);
255
        ASSERT(area->mapping[vpn] != UNALLOCATED_PFN);
256
    } else {
256
    } else {
257
        frame = area->mapping[vpn] * FRAME_SIZE;
257
        frame = area->mapping[vpn] * FRAME_SIZE;
258
    }
258
    }