From 8329f0e6d2379f3db6f3859c341655e1b995c111 Mon Sep 17 00:00:00 2001 From: GeorgeKang Date: Wed, 15 Apr 2015 16:36:06 +0800 Subject: [PATCH] root_thread: fix incorrect update of free_mem free_mem should be updated only if base of fpage is not assigned. --- user/root_thread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user/root_thread.c b/user/root_thread.c index ed7bf086..05c57a44 100644 --- a/user/root_thread.c +++ b/user/root_thread.c @@ -109,9 +109,9 @@ void __USER_TEXT __root_thread(kip_t *kip_ptr, utcb_t *utcb_ptr) } else { L4_Map(tid, (L4_Word_t)free_mem, fpage->size); fpage->base = (L4_Word_t)free_mem; + free_mem += fpage->size; } - free_mem += fpage->size; fpage++; }