Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you free a parent memory in an EXEC call in Minix?

In an EXEC call, I am looking to allow bigger "child process" by making memory through deleting Parent processes's memory.

I am using MINIX 3.2 and am planning to modify exec.c to call a modified version of alloc_new_mem in alloc.c

Here is the source code for alloc.c - https://github.com/minix3/minix/blob/master/servers/vm/alloc.c

Looking for pointers.

OS: MINIX3 File: alloc.c

like image 693
Emily Connors Avatar asked Nov 13 '22 14:11

Emily Connors


1 Answers

In the parent process you can simply return without waiting for the child process, so child process will be reparented to init and parent address space will be freed. This doesnt involve any hacks in the kernel.

like image 89
Santosh Avatar answered Nov 15 '22 05:11

Santosh