Changeset 1093620 in mainline for test/mm/falloc1


Ignore:
Timestamp:
2006-01-22T16:51:11Z (20 years ago)
Author:
Sergey Bondari <bondari@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0d8d27c
Parents:
bd6e392
Message:

Fixes, comments, tests to frame allocator

File:
1 edited

Legend:

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

    rbd6e392 r1093620  
    3030#include <mm/page.h>
    3131#include <mm/frame.h>
     32#include <mm/heap.h>
    3233#include <arch/mm/page.h>
    3334#include <arch/types.h>
    3435#include <debug.h>
    3536
    36 #define MAX_FRAMES 2048
     37#define MAX_FRAMES 1024
    3738#define MAX_ORDER 8
    38 #define TEST_RUNS 4
     39#define TEST_RUNS 2
    3940
    4041void test(void) {
    41         __address frames[MAX_FRAMES];
     42        __address * frames = (__address *) malloc(MAX_FRAMES*sizeof(__address));
    4243        int results[MAX_ORDER+1];
    4344       
     
    5354                        allocated = 0;
    5455                        for (i=0;i<MAX_FRAMES>>order;i++) {
    55                                 frames[allocated] = frame_alloc(FRAME_NON_BLOCKING, order, &status);
     56                                frames[allocated] = frame_alloc(FRAME_NON_BLOCKING | FRAME_KA, order, &status);
    5657                               
    5758                                if (frames[allocated] % (FRAME_SIZE << order) != 0) {
     
    8384        }
    8485
    85 
     86        free(frames);
    8687       
    8788        printf("Test passed\n");
Note: See TracChangeset for help on using the changeset viewer.