diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/stdlib/malloc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libc/stdlib/malloc.c b/lib/libc/stdlib/malloc.c index 68eccba..778a17e 100644 --- a/lib/libc/stdlib/malloc.c +++ b/lib/libc/stdlib/malloc.c @@ -975,11 +975,12 @@ free_pages(void *ptr, u_long index, struct pginfo *info) malloc_brk = pf->end; index = ptr2index(pf->end); - last_index = index - 1; for(i=index;i <= last_index;) page_dir[i++] = MALLOC_NOT_MINE; + last_index = index - 1; + /* XXX: We could realloc/shrink the pagedir here I guess. */ } if (pt) |