System call invoked when writing into a heap memory

后端 未结 3 816
北荒
北荒 2021-01-26 20:44

I know for malloc sbrk is the system call invoked ,Similarly What is the system cal invoked when i write to a malloed memory(heap memory)

int main

{

  /* 10 by         


        
3条回答
  •  再見小時候
    2021-01-26 21:19

    "operating system doesn't see every write that occurs: a write to memory corresponds simply to a STORE assembly instruction, not a system call. It is the hardware that takes care of the STORE and the necessary address translation. The only time the OS will see a memory write is when the address translation in the page tables fails, causing a trap to the OS. "

    Please read the below link for details

    http://pages.cs.wisc.edu/~dusseau/Classes/CS537-F04/Questions/sol12.html

提交回复
热议问题