summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mach-defpager/default_pager.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mach-defpager/default_pager.c b/mach-defpager/default_pager.c
index cd0f6e30..3fcf9c7d 100644
--- a/mach-defpager/default_pager.c
+++ b/mach-defpager/default_pager.c
@@ -1113,7 +1113,7 @@ pager_truncate(dpager_t pager, vm_size_t new_size) /* in pages */
{
const dp_map_t old_mapptr = pager->map;
pager->map = (dp_map_t) kalloc (INDIRECT_PAGEMAP_SIZE(new_size));
- memcpy (pager->map, old_mapptr, INDIRECT_PAGEMAP_SIZE(old_size));
+ memcpy (pager->map, old_mapptr, INDIRECT_PAGEMAP_SIZE(new_size));
kfree ((char *) old_mapptr, INDIRECT_PAGEMAP_SIZE (old_size));
}
}
@@ -1139,7 +1139,7 @@ pager_truncate(dpager_t pager, vm_size_t new_size) /* in pages */
{
const dp_map_t old_mapptr = pager->map;
pager->map = (dp_map_t) kalloc (PAGEMAP_SIZE (new_size));
- memcpy (pager->map, old_mapptr, PAGEMAP_SIZE (old_size));
+ memcpy (pager->map, old_mapptr, PAGEMAP_SIZE (new_size));
kfree ((char *) old_mapptr, PAGEMAP_SIZE (old_size));
}
}