Latest

英文、中文 / 諺語、片語、成語、口語對照 (2025.08.25 更新)

做表面功夫 go through the motion 目中無人;自視甚高 have one's nose in the air 有完沒完;別再說了 give it a rest  = can in 兵來將擋,水來土掩 roll with the punches (衍伸至拳擊) = take it as it comes 時間過得好慢。 The day is dragging on. 少臭美了 be full of oneself = Get over yourself! 你真是自以為是。 You are really all about yourself. 你一定找得到的。 You can't miss it. 那還用說。 You're telling me. 物超所值 get more bang for the buck 加把勁 pull one's socks up 出洋相;大吵大鬧 make a scene 風馬牛不相及 be neither here nor there 挖東牆補西牆 rob Peter to pay Paul 我覺得事有蹊蹺。 I smell a rat.  冤冤相報何時了。 Two wrongs don't make a right. 沒魚,蝦也好。 It's not so great, but it'll have to do.  自斷後路 burn one's bridge  這是掛保證的。 You can take it to the bank.  = You can quote me on that. 白手起家 rags-to-riches 放規矩點! Behave youself. = Mind your p's and q's. 悉聽尊便。 Anything you say. = It's up to you. = As you wish. 夠了!(住嘴) Cut it out! = Stop it! 閉嘴! Hold your tongue. = Shut up! 別太挑剔了! Don't be so fussy. 別搞砸了! Don't blow it. 別老叫我做東做西! Don't boss me arou...

對於「The Stack Is An Implementation Detail」系列文章之筆記

The Stack Is An Implementation Detail系列文由Eric Lippert所寫
Eric Lippert曾經在微軟工作,部落格為Fabulous adventures in coding

- - - 第一篇的筆記 - - -


第一篇之前看完了但沒做筆記
也許等重看時再補上


- - - 第二篇的筆記 - - -



allocation 分配
deallocation 釋放

heap有holes

formal parameter或parameter像是下面舉例的Test函式中的的x:
void Test(int x)
{
    ...
}

呼叫函式時的x則稱作argument:
Test(x)


文章中寫了garbage collection (GC)的運作:
"When a garbage collection is performed there are three phases: mark, sweep and compact. In the “mark” phase, we assume that everything in the heap is “dead”. The CLR knows what objects were “guaranteed alive” when the collection started, so those guys are marked as alive. Everything they refer to is marked as alive, and so on, until the transitive closure of live objects are all marked. In the “sweep” phase, all the dead objects are turned into holes. In the “compact” phase, the block is reorganized so that it is one contiguous block of live memory, free of holes."

簡單來說就是GC有三個階段:mark、sweep、compact




CLR collector是世代相傳的
放在heap裡的object的生命週期有:長、中、短之分
從短週期的開始,如果存活下來就移動到中週期的,再來則到長週期的
GC時常在短週期的heap裡執行;長週期的則相反
他們這麼做的想法是不想花費時間檢查長週期的,此外得迅速回收短週期的

留言

這個網誌中的熱門文章

公司職務 × 英文縮寫 × 中文對照 (2024.11.30 更新)

國泰世華信用卡 異常簽帳消費

打火機處理記 (注意,有爆炸危險!) (2021.09.11 更新)