You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by hz...@apache.org on 2017/06/07 19:03:55 UTC
[1/2] incubator-trafodion git commit: [TRAFODION-2636] Memory leak in
metadata context
Repository: incubator-trafodion
Updated Branches:
refs/heads/master 5c0abc96e -> dbd078c15
[TRAFODION-2636] Memory leak in metadata context
Fixing a memory leak found by Selva.
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/9dd45d25
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/9dd45d25
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/9dd45d25
Branch: refs/heads/master
Commit: 9dd45d251fda6a103c5d90b6706babbea55f32fa
Parents: 78a8390
Author: Hans Zeller <hz...@apache.org>
Authored: Wed Jun 7 15:43:23 2017 +0000
Committer: Hans Zeller <hz...@apache.org>
Committed: Wed Jun 7 15:43:23 2017 +0000
----------------------------------------------------------------------
core/sql/common/NAMemory.h | 5 +++++
core/sql/optimizer/ControlDB.cpp | 7 ++++++-
2 files changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/9dd45d25/core/sql/common/NAMemory.h
----------------------------------------------------------------------
diff --git a/core/sql/common/NAMemory.h b/core/sql/common/NAMemory.h
index 270289e..a37a5da 100644
--- a/core/sql/common/NAMemory.h
+++ b/core/sql/common/NAMemory.h
@@ -468,6 +468,11 @@ NA_EIDPROC
NAMemoryType getType() { return type_; }
NA_EIDPROC
NABoolean getUsage(size_t* lastSegSize, size_t* freeSize, size_t* totalSize);
+ // for debugging
+NA_EIDPROC
+ NABoolean containsAddress(void *addr)
+ { return NABlock::blockHolding(firstBlk_, addr) != NULL; }
+
// #ifdef NA_WINNT
#ifndef __EID
NABoolean getSharedMemory() { return sharedMemory_; }
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/9dd45d25/core/sql/optimizer/ControlDB.cpp
----------------------------------------------------------------------
diff --git a/core/sql/optimizer/ControlDB.cpp b/core/sql/optimizer/ControlDB.cpp
index adfcd16..ceab262 100644
--- a/core/sql/optimizer/ControlDB.cpp
+++ b/core/sql/optimizer/ControlDB.cpp
@@ -108,7 +108,12 @@ ControlDB::~ControlDB()
void ControlDB::setRequiredShape(ControlQueryShape *shape)
{
- delete requiredShape_;
+ if (requiredShape_)
+ {
+ delete requiredShape_->getShape();
+ delete requiredShape_;
+ }
+
if (!shape
||
!shape->getShape()
[2/2] incubator-trafodion git commit: Merge [TRAFODION-2636] Memory
leak in metadata context PR-1113
Posted by hz...@apache.org.
Merge [TRAFODION-2636] Memory leak in metadata context PR-1113
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/dbd078c1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/dbd078c1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/dbd078c1
Branch: refs/heads/master
Commit: dbd078c15f0b39ec1be8f2ec50aea858f79db497
Parents: 5c0abc9 9dd45d2
Author: Hans Zeller <hz...@apache.org>
Authored: Wed Jun 7 19:03:29 2017 +0000
Committer: Hans Zeller <hz...@apache.org>
Committed: Wed Jun 7 19:03:29 2017 +0000
----------------------------------------------------------------------
core/sql/common/NAMemory.h | 5 +++++
core/sql/optimizer/ControlDB.cpp | 7 ++++++-
2 files changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------