[請益] freeArr 中的 p 和 r
在測試程式的動作
mtest> mtn 1 -a 5
Calling allocArr...(64)
Calling MemMgr::getMem...(64)
Memory acquired... 0x9264c30
mtest> mtd -i 0 -a
Calling freeArr...(0x9264c30)
>> Array size = 5
Recycling 0x9264c30 to (5)
下面是 code 對應的部分
( 但 r 不是應該在 p 前面 4 bytes 嗎 ? 還是我搞錯了@@)
cout << "Calling freeArr...(" << p << ")" << endl;
// 2. Get 'r' which points to the beginning of the memory element and
// is the memory address to recycle
cout << "Recycling " << r << " to (" << n << ")" << endl;
--
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 219.87.129.152
推
12/16 23:50, , 1F
12/16 23:50, 1F
推
12/16 23:50, , 2F
12/16 23:50, 2F
→
12/16 23:51, , 3F
12/16 23:51, 3F