5

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

  • Do you mean that you wish to free the parent's memory so you would have more *physical* memory for the child? Or are you looking to increase the max VMEM for the child process? – Yam Marcovic Dec 21 '12 at 17:02
  • Surely that would fall over as soon as the child process exits and the waiting parent gets to run? – Mats Petersson Dec 25 '12 at 17:30

1 Answers1

1

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.

Santosh
  • 799
  • 7
  • 14