diff options
author | con <qtc-committer@nokia.com> | 2009-10-26 13:51:56 +0100 |
---|---|---|
committer | con <qtc-committer@nokia.com> | 2009-10-26 13:51:56 +0100 |
commit | 441ece365aba579eeb66acb509df466f5029c580 (patch) | |
tree | b4f8ac51e0203bad62c301f0c891b9246a15ad6a /src/shared/cplusplus/MemoryPool.h | |
parent | 4504aec7deb2f0abcd6a71e094bbcfb4edd5154d (diff) | |
parent | 3c0ca8c18881bc26fd8946bc2651fa89b10a1329 (diff) | |
download | qt-creator-441ece365aba579eeb66acb509df466f5029c580.tar.gz |
Merge commit 'origin/1.3'
Conflicts:
src/plugins/cpptools/cppcodecompletion.h
src/plugins/debugger/gdb/gdbengine.cpp
src/plugins/qmleditor/QmlEditor.pluginspec
Diffstat (limited to 'src/shared/cplusplus/MemoryPool.h')
-rw-r--r-- | src/shared/cplusplus/MemoryPool.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/shared/cplusplus/MemoryPool.h b/src/shared/cplusplus/MemoryPool.h index e0f1ff8701..5b6fae925f 100644 --- a/src/shared/cplusplus/MemoryPool.h +++ b/src/shared/cplusplus/MemoryPool.h @@ -79,6 +79,22 @@ public: return allocate_helper(size); } + struct State + { + char *ptr; + char *end; + int blockCount; + + inline bool isValid() const + { return ptr != 0; } + + inline State(char *ptr = 0, int blockCount = 0) + : ptr(ptr), blockCount(blockCount) {} + }; + + State state() const; + void rewind(const State &state); + private: void *allocate_helper(size_t size); |