Mercurial > hg > Members > anatofuz > CbC_xv6
diff src/context.h @ 62:a28580a75faa
fix build fs.img
author | anatofuz |
---|---|
date | Thu, 25 Jul 2019 20:04:17 +0900 |
parents | 435bfab09924 |
children |
line wrap: on
line diff
--- a/src/context.h Thu Jul 11 18:51:52 2019 +0900 +++ b/src/context.h Thu Jul 25 20:04:17 2019 +0900 @@ -15,8 +15,13 @@ #include "fs.h" #include "defs.h" +#ifdef XV6KERNEL #define calloc(a,b) kmalloc((a)*(b)) #define free(a) kfree(a) +#else +#define calloc(a,b) malloc((a)*(b)) +#define free(a) free(a) +#endif #define ALLOCATE_SIZE 20000000 #define NEW(type) (type*)(calloc(1, sizeof(type)))