Messages in this thread |  | | Subject | Re: pagecoloring: kernel 2.2 mm question: what is happening during fork ? | | From | Momchil Velikov <> | | Date | 29 Jan 2002 16:43:19 +0200 |
| |
>>>>> "Cabaniols" == Cabaniols, Sebastien <Sebastien.Cabaniols@Compaq.com> writes:
Cabaniols> When I do a fork, which part of the kernel is allocating the memory for Cabaniols> the childs, where and when the memory copy takes place ?
mm/memory.c:copy_page_range()
It copies page tables and marks the ptes copy-on-write.
Cabaniols> I know that Cabaniols> linux is doing copy on write but I don't know which part of the kernel Cabaniols> is really doing the page allocation when the copy on write understands Cabaniols> that the process really wants to write now. Then the second question is Cabaniols> how is the memory copy done ?
mm/memory.c: handle_mm_fault()/handle_pte_fault() and do_wp_page()
Cabaniols> The third and last question is what is the role of the slab allocator ? Cabaniols> When does a process asks for memory from a slab ? Is it used to build Cabaniols> the stack the heap ?
Slab allocator is a memory allocation and caching mechanism for (small) kernel objects. It is described in, e.g.,
http://nondot.org/sabre/os/files/MemManagement/SlabAllocator.pdf
Regards, -velco
PS. You may also find help on irc.openprojects.net, #kernelnewbies
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |