Hi,
Ctxt : QPCPP version : 5.1.1 (Yes quite old).
Looking for a memory leak in my application (one of the pool "leak" one item after thousands of allocation/re-collection), I use Q-SPY to help me on this case.
In the NEW/GC-ATT/GC logs, I only got event information like these :
--- qspy.orig/source/qspy.c 2018-06-18 12:19:59.650924606 +0200
+++ qspy/source/qspy.c 2018-06-27 11:24:33.128131173 +0200
@@ -1259,16 +1259,18 @@
t = QSpyRecord_getUint32(me, l_tstampSize);
a = QSpyRecord_getUint32(me, l_evtSize);
c = QSpyRecord_getUint32(me, l_sigSize);
p);
QSPY_onPrintLn();
if (l_matFile != (FILE *)0) {
fprintf(l_matFile, "%3d %10u %4u %4u\n",
b, c, p);
QSPY_onPrintLn();
if (l_matFile != (FILE *)0) {
fprintf(l_matFile, "%3d %10u %4u %3u %3u\n",
diff --git a/QP/qf/source/qf_new.cpp b/QP/qf/source/qf_new.cpp
index 074f543..1f37b4a 100644
--- a/QP/qf/source/qf_new.cpp
+++ b/QP/qf/source/qf_new.cpp
@@ -58,13 +58,6 @@
}
Q_ASSERT(idx < QF_maxPool_); // cannot run out of registered pools
QEvt *e;
QF_EPOOL_GET_(QF_pool_[idx], e, margin); // get e -- platform-dependent
if (e != null_evt) { // was e allocated correctly?
@@ -75,6 +68,14 @@
else {
Q_ASSERT(margin != u16_0); // must tollerate bad allocation
}
diff --git a/QP/qf/source/qf_gc.cpp b/QP/qf/source/qf_gc.cpp
index a5ee71a..bcf8a94 100644
--- a/QP/qf/source/qf_gc.cpp
+++ b/QP/qf/source/qf_gc.cpp
@@ -56,6 +56,7 @@
QS_TIME_(); // timestamp
QS_SIG_(e->sig); // the signal of the event
QS_2U8_(e->poolId_, e->refCtr_);// pool Id & refCtr of the evt
QS_OBJ_(e); //The event address
QS_END_NOCRIT_()
QF_CRIT_EXIT_();
@@ -67,6 +68,7 @@
QS_TIME_(); // timestamp
QS_SIG_(e->sig); // the signal of the event
QS_2U8_(e->poolId_, e->refCtr_);// pool Id & refCtr of the evt
QS_OBJ_(e); //The event address
QS_END_NOCRIT_()
QF_CRIT_EXIT_();
Anonymous