add_process_memory_range(): optionally return range object

This commit is contained in:
Balazs Gerofi
2016-12-30 15:51:17 +09:00
parent 1794232989
commit ec75095073
5 changed files with 51 additions and 59 deletions

View File

@ -125,7 +125,7 @@ int prepare_process_ranges_args_envs(struct thread *thread,
up = virt_to_phys(up_v);
if (add_process_memory_range(vm, s, e, up, flags, NULL, 0,
PAGE_SHIFT) != 0) {
PAGE_SHIFT, NULL) != 0) {
ihk_mc_free_pages(up_v, range_npages);
kprintf("ERROR: adding memory range for ELF section %i\n", i);
goto err;
@ -213,7 +213,7 @@ int prepare_process_ranges_args_envs(struct thread *thread,
args_envs_p = virt_to_phys(args_envs);
if(add_process_memory_range(vm, addr, e, args_envs_p,
flags, NULL, 0, PAGE_SHIFT) != 0){
flags, NULL, 0, PAGE_SHIFT, NULL) != 0){
ihk_mc_free_pages(args_envs, ARGENV_PAGE_COUNT);
kprintf("ERROR: adding memory range for args/envs\n");
goto err;