作者DevilAndrew (交程式? 停修单?)
看板EE_DSnP
标题[请益] freeArr 中的 p 和 r
时间Sat Dec 16 23:26:09 2006
在测试程式的动作
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
1F:推 ric2k1:"Memory acquired... 0x9264c30" 以及 12/16 23:50
2F:推 ric2k1:"Recycling 0x9264c30 to (5)" 12/16 23:50
3F:→ ric2k1:"ret" 与 "r" 都是指 p 前面 4 bytes 12/16 23:51