Mercurial > hg > Members > menikon > CbC_xv6
changeset 266:597c79dd5851
kmalloc log test
author | tobaru |
---|---|
date | Sun, 26 Jan 2020 19:07:56 +0900 |
parents | f9169495d476 |
children | d92c7a06d714 |
files | src/buddy.c src/gearsTools/lib/Gears/Context/Template/XV6.pm |
diffstat | 2 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/buddy.c Sun Jan 26 18:20:40 2020 +0900 +++ b/src/buddy.c Sun Jan 26 19:07:56 2020 +0900 @@ -247,7 +247,6 @@ { uint8 *up; - ln(order); if ((order > MAX_ORD) || (order < MIN_ORD)) { panic("kmalloc: order out of range\n"); }
--- a/src/gearsTools/lib/Gears/Context/Template/XV6.pm Sun Jan 26 18:20:40 2020 +0900 +++ b/src/gearsTools/lib/Gears/Context/Template/XV6.pm Sun Jan 26 19:07:56 2020 +0900 @@ -30,9 +30,10 @@ # endif #endif +#include "ln.h" #ifdef XV6KERNEL extern void* kmalloc (int order); -#define calloc(a,b) kmalloc((a)*(b)) +#define calloc(a,b) kmalloc(ln((a)*(b))) #define free(a) kfree(a) #else extern void* malloc(unsigned int sz); @@ -40,7 +41,7 @@ #define free(a) free(a) #endif -#define ALLOCATE_SIZE 12 +#define ALLOCATE_SIZE 20000 #define NEW(type) (type*)(calloc(1, sizeof(type))) #define NEWN(n, type) (type*)(calloc(n, sizeof(type)))