35,11 → 35,18 |
#include <debug.h> |
#include <align.h> |
|
#ifdef CONFIG_BENCH |
#include <arch/cycle.h> |
#endif |
|
#define MAX_FRAMES 1024 |
#define MAX_ORDER 8 |
#define TEST_RUNS 2 |
|
void test(void) { |
void test_falloc1(void) { |
#ifdef CONFIG_BENCH |
uint64_t t0 = get_cycle(); |
#endif |
uintptr_t * frames = (uintptr_t *) malloc(MAX_FRAMES*sizeof(uintptr_t), 0); |
int results[MAX_ORDER+1]; |
|
88,5 → 95,9 |
free(frames); |
|
printf("Test passed.\n"); |
#ifdef CONFIG_BENCH |
uint64_t dt = get_cycle() - t0; |
printf("Time: %.*d cycles\n", sizeof(dt) * 2, dt); |
#endif |
} |
|