SQL Memory allocation tracing and overflow detection 1) Added code to record stack info when given size of memory blocks are allocated and dump these info out to a file or terminal if the deallocation is not made at the time the heap is distructed. This works for heaps constructed from NAMemory. 2) Fixed the memory debug code to detected memory overflow at the de-allocation time. These two features are enabled through environment variables in objects compiled in debug mode. See sql/common/NAMemory.cpp for details. 3) Fixes for memory usage issues found when testing above code.
Fix for bug 1373179 Native Hbase Table access via Trafodion dumps core. The error messages passed from Java layer to JNI was not handled correctly leading to core dump. Fixed the error handling code correctly.
Also flagged three Java Objects in HTableClient for gc earlier to reduce the java object memory usage.
Separated out the relase and flush HTableClient as two different operations to ensure that HTableClient can be continued to be used even after flush.
Changed NAString in error routines to use the relevant heap instead of system heap.