Browse Source

Kernel: Drop the "helper" region after ELF load is finished.

The individual segment mappings will keep the VMObject alive.
Andreas Kling 6 years ago
parent
commit
6103e374cc
1 changed files with 1 additions and 3 deletions
  1. 1 3
      Kernel/Process.cpp

+ 1 - 3
Kernel/Process.cpp

@@ -316,7 +316,7 @@ int Process::do_exec(const String& path, Vector<String>&& arguments, Vector<Stri
 
     auto vmo = VMObject::create_file_backed(descriptor->inode());
     vmo->set_name(descriptor->absolute_path());
-    RetainPtr<Region> region = allocate_region_with_vmo(LinearAddress(), descriptor->metadata().size, vmo.copy_ref(), 0, "helper", true, false);
+    RetainPtr<Region> region = allocate_region_with_vmo(LinearAddress(), descriptor->metadata().size, vmo.copy_ref(), 0, "executable", true, false);
 
     // FIXME: Should we consider doing on-demand paging here? Is it actually useful?
     bool success = region->page_in();
@@ -362,8 +362,6 @@ int Process::do_exec(const String& path, Vector<String>&& arguments, Vector<Stri
         }
     }
 
-    m_regions.append(move(region));
-
     m_signal_stack_kernel_region = nullptr;
     m_signal_stack_user_region = nullptr;
     m_display_framebuffer_region = nullptr;