What happens to the old stack, heap, and (initialized and uninitialized) data segments after execve() call?
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
Manpage of execve() says
execve() executes the program pointed to by filename. This causes
the program that is currently being run by the calling process to be
replaced with a new program, with newly initialized stack, heap, and
(initialized and uninitialized) data segments.
What normally happens to the old "stack, heap, and (initialized and uninitialized) data segments"?
Are they deallocated if the calling process was not created by vfork()?
Before seeing the quote, I thought that execve() would overwrite the old "stack, heap, and (initialized and uninitialized) data segments". So I was surprised to see the quote, and wonder why waste the new space?
Thanks.
linux process exec
add a comment |Â
up vote
0
down vote
favorite
Manpage of execve() says
execve() executes the program pointed to by filename. This causes
the program that is currently being run by the calling process to be
replaced with a new program, with newly initialized stack, heap, and
(initialized and uninitialized) data segments.
What normally happens to the old "stack, heap, and (initialized and uninitialized) data segments"?
Are they deallocated if the calling process was not created by vfork()?
Before seeing the quote, I thought that execve() would overwrite the old "stack, heap, and (initialized and uninitialized) data segments". So I was surprised to see the quote, and wonder why waste the new space?
Thanks.
linux process exec
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Manpage of execve() says
execve() executes the program pointed to by filename. This causes
the program that is currently being run by the calling process to be
replaced with a new program, with newly initialized stack, heap, and
(initialized and uninitialized) data segments.
What normally happens to the old "stack, heap, and (initialized and uninitialized) data segments"?
Are they deallocated if the calling process was not created by vfork()?
Before seeing the quote, I thought that execve() would overwrite the old "stack, heap, and (initialized and uninitialized) data segments". So I was surprised to see the quote, and wonder why waste the new space?
Thanks.
linux process exec
Manpage of execve() says
execve() executes the program pointed to by filename. This causes
the program that is currently being run by the calling process to be
replaced with a new program, with newly initialized stack, heap, and
(initialized and uninitialized) data segments.
What normally happens to the old "stack, heap, and (initialized and uninitialized) data segments"?
Are they deallocated if the calling process was not created by vfork()?
Before seeing the quote, I thought that execve() would overwrite the old "stack, heap, and (initialized and uninitialized) data segments". So I was surprised to see the quote, and wonder why waste the new space?
Thanks.
linux process exec
linux process exec
asked 2 mins ago
Tim
24.1k67233419
24.1k67233419
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f475654%2fwhat-happens-to-the-old-stack-heap-and-initialized-and-uninitialized-data-se%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password