Changeset 085d973 in mainline for test/mm/falloc2/test.c


Ignore:
Timestamp:
2006-02-08T12:34:05Z (19 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5e3757d
Parents:
eb1b8b6
Message:

Cleanup o frame allocator.
Removed early_malloc & initial heap.
Will break ia64, ppc & sparc.
Added e820 table print.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/mm/falloc2/test.c

    reb1b8b6 r085d973  
    3030#include <mm/page.h>
    3131#include <mm/frame.h>
    32 #include <mm/heap.h>
     32#include <mm/slab.h>
    3333#include <arch/mm/page.h>
    3434#include <arch/types.h>
     
    6464                        allocated = 0;
    6565                        for (i = 0; i < (MAX_FRAMES >> order); i++) {
    66                                 frames[allocated] = frame_alloc_rc(order, FRAME_ATOMIC | FRAME_KA, &status);
     66                                frames[allocated] = PA2KA(PFN2ADDR(frame_alloc_rc(order, FRAME_ATOMIC | FRAME_KA, &status)));
    6767                                if (status == 0) {
    6868                                        memsetb(frames[allocated], FRAME_SIZE << order, val);
     
    8282                                        }
    8383                                }
    84                                 frame_free(frames[i]);
     84                                frame_free(ADDR2PFN(KA2PA(frames[i])));
    8585                        }
    8686                        printf("Thread #%d (cpu%d): Finished run.\n", THREAD->tid, CPU->id);
Note: See TracChangeset for help on using the changeset viewer.