DEV Community

Cover image for xv6 memory system
Van a performance artist
Van a performance artist

Posted on

xv6 memory system

each process can occupy the mempages it needs in xv6.

page management process

kalloc() function apply for a new page
Image description
kalloc consume kmem.freelist and kfree return resource back.
freelist is just a linked list with no other info

Image description
implement of memset in xv6. we only memeset at alloc part which means all the address has been initialized at the start stage in freelist.

memory initial part

Image description

all kmem has been alloced at init stage

Image description

Top comments (0)