Open TheRiseOfDavid opened 1 week ago
64bit x86 架構 asm 編譯 linux kernel 6.11.5 Q1 result [ ] 這樣結果正確嗎? ===========================Before Fork================================== pid=1936: global variable global_a: Offest of logical address:[0x564033932010] Physical address:[0x333c68e7] ======================================================================== llllllllllllllllllllllllll After Fork by child llllllllllllllllllllllllllllllll ******* pid=1937: global variable global_a: ******* Offset of logical address:[0x564033932010] Physical address:[0x333c6885] llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll ____________________________________________________________________________ iiiiiiiiiiiiiiiiiiiiiiiiii Test copy on write in child iiiiiiiiiiiiiiiiiiiiiiii ******* pid=1937: global variable global_a: ******* Offset of logical address:[0x564033932010] Physical address:[0x398a88e7] iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii ____________________________________________________________________________ ===========================Before Fork================================== pid=1936: global variable global_a: Offest of logical address:[0x564033932010] Physical address:[0x333c68e7] ======================================================================== vvvvvvvvvvvvvvvvvvvvvvvvvv After Fork by parent vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv pid=1936: global variable global_a: ******* Offset of logical address:[0x564033932010] Physical address:[0x333c68a5] vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
64bit x86 架構 asm 編譯 linux kernel 6.11.5
===========================Before Fork================================== pid=1936: global variable global_a: Offest of logical address:[0x564033932010] Physical address:[0x333c68e7] ======================================================================== llllllllllllllllllllllllll After Fork by child llllllllllllllllllllllllllllllll ******* pid=1937: global variable global_a: ******* Offset of logical address:[0x564033932010] Physical address:[0x333c6885] llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll ____________________________________________________________________________ iiiiiiiiiiiiiiiiiiiiiiiiii Test copy on write in child iiiiiiiiiiiiiiiiiiiiiiii ******* pid=1937: global variable global_a: ******* Offset of logical address:[0x564033932010] Physical address:[0x398a88e7] iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii ____________________________________________________________________________ ===========================Before Fork================================== pid=1936: global variable global_a: Offest of logical address:[0x564033932010] Physical address:[0x333c68e7] ======================================================================== vvvvvvvvvvvvvvvvvvvvvvvvvv After Fork by parent vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv pid=1936: global variable global_a: ******* Offset of logical address:[0x564033932010] Physical address:[0x333c68a5] vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
### Q2 result - [ ] 為什麼出來的結果 physical address 前面是 8 digits, 後面是 4 digits.
記憶體正確檢查方式
Tricky 的寫法 ok 推薦可以修 os costone (os 即時) 去交大修,軟韌最佳課程
看起來是因為 4096 沒有做 unsigned long
Environment
global element a[0]: Offest of logical address:[0x5aff6b044040] Physical address:[0x45886a67]
global element a[1999999]: Offest of logical address:[0x5aff6b7e523c] Physical address:[0x11e0]