作者BattleRoyale (翔焰)
看板EE_DSnP
标题[问题] hw4再一问
时间Sun Apr 27 19:55:57 2008
while (i < R_SIZE) {
const MemRecycleList<T>* ll = &(_recycleList[i]);
while (ll != 0) {
size_t s = ll->getSize();
if (s) {
cout << "[" << setw(3) << right << ll->_arrSize << "]
= "<< setw(10) << left << s;
if (++count % 4 == 0) cout << endl; }
ll = ll->_nextList;
}
++i; }
这是在MemMgr.h中的一小段...
对於ll有点不太懂@@"
在第二行它指向了 &(_recycleList[i])的位址
请问
ll!=0是什麽意思呢? 它既然是个pointer 里面应该存的是位址
那什麽时间ll会=0离开while回圈呢
另外...也不太懂ll = ll->_nextList的意思
因为&_recycleList[i]已经代表指向现在0~255的RecycleList了
所以_nextList就是投影片教的指向超过255(也就是%256的recyclist罗?)
麻烦老师了<(_ _)>
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 218.166.159.66