3 ms·
The second example says "First allocate 1GiB, free it, then spawn a process which does the same but with 2GiB." In the code it seems it is the parent process
by imjonse 3y ago
The second example says
"First allocate 1GiB, free it, then spawn a process which does the same but with 2GiB."
In the code it seems it is the parent process that does the second call too.
if (pid != 0) {
malloc_and_fill(1L << 31);
}
The result is not affected but the wording is not very clear I think.
- fabiensanglard 3y agoThank you for reporting this mistake. It is fixed now :) !