comparison src/context.h @ 62:a28580a75faa

fix build fs.img
author anatofuz
date Thu, 25 Jul 2019 20:04:17 +0900
parents 435bfab09924
children
comparison
equal deleted inserted replaced
61:b3a3224e1823 62:a28580a75faa
13 #include "types.h" 13 #include "types.h"
14 #include "use_context_numbers.h" 14 #include "use_context_numbers.h"
15 #include "fs.h" 15 #include "fs.h"
16 #include "defs.h" 16 #include "defs.h"
17 17
18 #ifdef XV6KERNEL
18 #define calloc(a,b) kmalloc((a)*(b)) 19 #define calloc(a,b) kmalloc((a)*(b))
19 #define free(a) kfree(a) 20 #define free(a) kfree(a)
21 #else
22 #define calloc(a,b) malloc((a)*(b))
23 #define free(a) free(a)
24 #endif
20 25
21 #define ALLOCATE_SIZE 20000000 26 #define ALLOCATE_SIZE 20000000
22 #define NEW(type) (type*)(calloc(1, sizeof(type))) 27 #define NEW(type) (type*)(calloc(1, sizeof(type)))
23 #define NEWN(n, type) (type*)(calloc(n, sizeof(type))) 28 #define NEWN(n, type) (type*)(calloc(n, sizeof(type)))
24 29