GithubHelp home page GithubHelp logo

Comments (2)

huihongxiao avatar huihongxiao commented on August 20, 2024 1

重新听了视频,在lec08的12分54秒,视频中的确说的是分配page。但是根据Linux man page,sbrk应该是以bytes为单位。

这里可能与实际的底层实现有关系,底层的内存管理应该都是要以page为单位来进行,因为最后需要通过Page Table体现到应用程序中。这里sbrk可能只是软件记录了字节数,但是在内存分配上还是以page为单位,当sbrk申请的新的空间超出了当前可用的page,那么会涉及到新申请一个page。

from mit6.s081.

songmuhan avatar songmuhan commented on August 20, 2024

代码里面有给出,sys_sbrk->growproc->uvmalloc。uvmalloc中old size -> new size 是以一个page的大小增加的。

from mit6.s081.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.