#At file:///home/jonas/src/telco-6.3/ based on revid:jonas@perch-20101029122145-7vsfhnq6jmlozh2k
3327 jonas oreland 2010-11-01
ndb - add in_use checking to DLList for fast detection of incorrect usage (VM_TRACE)
modified:
storage/ndb/src/kernel/vm/DLList.hpp
=== modified file 'storage/ndb/src/kernel/vm/DLList.hpp'
--- a/storage/ndb/src/kernel/vm/DLList.hpp 2009-10-08 09:55:36 +0000
+++ b/storage/ndb/src/kernel/vm/DLList.hpp 2010-11-01 09:44:05 +0000
@@ -35,7 +35,10 @@ public:
struct HeadPOD {
Uint32 firstItem;
inline bool isEmpty() const { return firstItem == RNIL; }
- inline void init () { firstItem = RNIL; }
+ inline void init () { firstItem = RNIL; in_use = false;}
+#ifdef VM_TRACE
+ bool in_use;
+#endif
};
struct Head : public HeadPOD
@@ -169,9 +172,16 @@ public:
: DLListImpl<P,T,U>(thePool), src(_src)
{
this->head = src;
+#ifdef VM_TRACE
+ assert(src.in_use == false);
+ src.in_use = true;
+#endif
}
~LocalDLListImpl(){
+#ifdef VM_TRACE
+ assert(src.in_use == true);
+#endif
src = this->head;
}
private:
Attachment: [text/bzr-bundle] bzr/jonas@mysql.com-20101101094405-aoru9d9vz9at6dll.bundle
| Thread |
|---|
| • bzr commit into mysql-5.1-telco-6.3 branch (jonas:3327) | jonas oreland | 1 Nov |