Hi,

 

I believe I've run into a memory leak with ibis 1.1.5

 

In the function, ibis::fileManager::storage::enlarge, there is a call to
swap() around line 1909, looks like

 

                try {

                    ibis::fileManager::storage cp(nelm);

                    memcpy(cp.m_begin, m_begin, oldsize);

                    

                  cp.m_end;

 

                    swap(cp);

                }

                catch (...) {

                    LOGGER(ibis::gVerbose >= 0)

                                << "Warning -- " << evt << " failed to
allocate new storage, "

                                "current storage unchanged";

                }

 

 

The swap function also swaps the reference count value which causes the
m_begin buffer to not be freed up because the temporary object on the
stack inherited the reference count of the current object. 

 

I've made a change in my sources where I did not swap the reference
count when enlarging the storage and that took care of the leak.

 

Thanks.

 

Zeid

_______________________________________________
FastBit-users mailing list
[email protected]
https://hpcrdm.lbl.gov/cgi-bin/mailman/listinfo/fastbit-users

Reply via email to