[英]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. 在EXEC调用中,我希望通过删除父进程的内存来创建内存来允许更大的“子进程”。
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
我正在使用MINIX 3.2并计划修改
exec.c
以在alloc.c
调用alloc_new_mem
的修改版本
Here is the source code for alloc.c - https://github.com/minix3/minix/blob/master/servers/vm/alloc.c 以下是alloc.c的源代码 - https://github.com/minix3/minix/blob/master/servers/vm/alloc.c
Looking for pointers. 寻找指针。
OS: MINIX3 File: alloc.c 操作系统:MINIX3文件:alloc.c
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. 在父进程中,您可以简单地返回而无需等待子进程,因此子进程将被重新分配给init,并且将释放父地址空间。 This doesnt involve any hacks in the kernel.
这不涉及内核中的任何黑客攻击。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.