diff options
Diffstat (limited to 'arch/um/os-Linux/main.c')
-rw-r--r-- | arch/um/os-Linux/main.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/um/os-Linux/main.c b/arch/um/os-Linux/main.c index ea9a23696f36..fb510d40480c 100644 --- a/arch/um/os-Linux/main.c +++ b/arch/um/os-Linux/main.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include "uml-config.h" | 24 | #include "uml-config.h" |
25 | #include "os.h" | 25 | #include "os.h" |
26 | #include "um_malloc.h" | 26 | #include "um_malloc.h" |
27 | #include "kern_constants.h" | ||
27 | 28 | ||
28 | /* Set in main, unchanged thereafter */ | 29 | /* Set in main, unchanged thereafter */ |
29 | char *linux_prog; | 30 | char *linux_prog; |
@@ -232,7 +233,8 @@ void *__wrap_malloc(int size) | |||
232 | 233 | ||
233 | if(!CAN_KMALLOC()) | 234 | if(!CAN_KMALLOC()) |
234 | return __real_malloc(size); | 235 | return __real_malloc(size); |
235 | else if(size <= PAGE_SIZE) /* finding contiguos pages can be hard*/ | 236 | else if(size <= UM_KERN_PAGE_SIZE) |
237 | /* finding contiguous pages can be hard*/ | ||
236 | ret = um_kmalloc(size); | 238 | ret = um_kmalloc(size); |
237 | else ret = um_vmalloc(size); | 239 | else ret = um_vmalloc(size); |
238 | 240 | ||