作者averangeall (洗髮精用完了)
看板EE_DSnP
標題[問題] MTReset
時間Sat Nov 21 20:53:00 2009
不好意思 請問一個小問題 不是很重要的XD
就是在作業裡的 spec 裡
有關於 MTReset 的一個溫馨小提醒 說要注意
2. If the specified "blockSize" is not a legal integer or is smaller than
toSizeT(size of class "MemTestObj").
這樣的意思應該是說 如果 MemTestObj 的 size 是 18 的話
然後我們如果用的是 64 bit 的機器的話
如果打
mtr 18
應該是不合法
因為 toSizeT(size of class "MemTestObj") 應該是 24 吧
所以小於等於 24 的數字應該都過不了才是
可是在 ref 裡的 memTest
我打 mtr 18 之後
它就幫我把 18 升級到 24 了XD
所以應該要怎麼辦呢
謝謝大家的回答:)
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.112.249.226
1F:推 MacacaXDrz:mtest> mtr 123 // reset memory manager with blockSi 11/21 21:17
2F:→ MacacaXDrz:ze = toSizeT(123) Bytes 11/21 21:17
3F:推 ric2k1:這邊的 spec 的確定義的不夠精確, 我的意思應該是 2.If the 11/21 22:04
4F:→ ric2k1:specified "blockSize" is not a legal integer or is smal 11/21 22:04
5F:→ ric2k1:smaller than sizeof(MemTestObj). 11/21 22:05
6F:→ ric2k1:不過這部份 (i.e. 18 <= size < 24) 我會請 TA 不要測好了! 11/21 22:06
7F:→ averangeall:好的 謝謝老師的回答:) 11/21 22:07