Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. COMy point is that it should be able to "find a bunch of free memory" because it apparently it *already can* "find a bunch of free memory." Fork creates a new process, which is different, and I know I could abstract any detail away by using a library. But I'm giving the kernel developers credit and assuming there's good reason for things to work this way, and I want to know why.
      singulars
    2. COfork (exec really, since fork just copies everything) are the "find me a bunch of free memory" functions. `clone` is the "I want to control the details of my process creation" function. pthread_create is the "create me a thread, use the defaults" function. These are your choices. New threads need their own stack, and you can't use the traditional method of allocating stack (start at the top/bottom of the (user) address space and grown down/up towards the heap which is growing the other way), because there's only one top/bottom of the address space.
      singulars
    3. COMy point is that when the user forks a process, even though that process gets its own memory space, at some level the kernel has to be doing memory management of the *physical* address space that the process-specific address spaces map into. If it can do that, it should have the logic to be able to handle letting me clone but handle the stack for me. I might want to use clone for reasons that don't have anything to do with stacks for example (see the clone flags).
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload