summaryrefslogtreecommitdiff
path: root/src/mongo/db/memconcept.cpp
blob: 279c824d2f4bafb9e98cfdbd1e34a22d47a1fe63 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//#if defined(_DEBUG)
#if 0

#include <string>
#include <map>
#include "memconcept.h"

using namespace std;

#include "../util/assert_util.h"

namespace mongo {
    namespace memconcept { 

        struct C { 
            C() : c(err) { }
            C(concept x) : c(x) { }
            C(concept x, string y) : c(x),desc(y) { }
            concept c;
            string desc;
        };

        typedef map<void*,C> M;

        M &ranges( * new M() );

        void is(void *p, concept c, string description, unsigned len) {
            ranges[p] = C(c,description);
        }

        void invalidate(void *p, unsigned len) {
            invalidate(p);
        }

        void invalidate(void *p) {
            if( ranges.count(p) ) { 
            }
            ranges.erase(p);
        }

    }
}

#endif