Skip to content

Commit 6103e37

Browse files
committed
Kernel: Drop the "helper" region after ELF load is finished.
The individual segment mappings will keep the VMObject alive.
1 parent d333013 commit 6103e37

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Kernel/Process.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ int Process::do_exec(const String& path, Vector<String>&& arguments, Vector<Stri
316316

317317
auto vmo = VMObject::create_file_backed(descriptor->inode());
318318
vmo->set_name(descriptor->absolute_path());
319-
RetainPtr<Region> region = allocate_region_with_vmo(LinearAddress(), descriptor->metadata().size, vmo.copy_ref(), 0, "helper", true, false);
319+
RetainPtr<Region> region = allocate_region_with_vmo(LinearAddress(), descriptor->metadata().size, vmo.copy_ref(), 0, "executable", true, false);
320320

321321
// FIXME: Should we consider doing on-demand paging here? Is it actually useful?
322322
bool success = region->page_in();
@@ -362,8 +362,6 @@ int Process::do_exec(const String& path, Vector<String>&& arguments, Vector<Stri
362362
}
363363
}
364364

365-
m_regions.append(move(region));
366-
367365
m_signal_stack_kernel_region = nullptr;
368366
m_signal_stack_user_region = nullptr;
369367
m_display_framebuffer_region = nullptr;

0 commit comments

Comments
 (0)