Skip to content
Snippets Groups Projects
Commit 9817279e authored by Pietro Incardona's avatar Pietro Incardona
Browse files

Small bug fixes

parent add2acfe
No related branches found
No related tags found
No related merge requests found
......@@ -26,10 +26,10 @@ typedef unsigned char byte;
*
* It differs from HeapMemory in resize behavior.
*
* In the case of HeapMemory if you try to shrink the memory nothing happen to the allocated memory.
* In the case of BHeapMemory if you try to shrink the memory nothing happen to the allocated memory.
* To destroy the internal memory you must use destroy.
*
* BHeapMemory does not shrink the memory, but it shrink the buffer size. size will always return the buffer size
* BHeapMemory does not shrink the memory, but it shrink the buffer size. size() always return the buffer size
*
* ### Allocate memory
*
......@@ -66,7 +66,7 @@ public:
:HeapMemory(),buf_sz(0)
{};
virtual ~BHeapMemory()
virtual ~BHeapMemory() noexcept
{
};
......
......@@ -138,7 +138,7 @@ public:
//! Constructor, we choose a default alignment of 32 for avx
HeapMemory():alignement(MEM_ALIGNMENT),sz(0),dm(NULL),dmOrig(NULL),ref_cnt(0) {};
virtual ~HeapMemory()
virtual ~HeapMemory() noexcept
{
if(ref_cnt == 0)
HeapMemory::destroy();
......
......@@ -119,6 +119,10 @@ static inline void print_stack()
std::cerr << str.str() << std::endl;
#else
std::cerr << "Stack trace deactivated" << std::endl;
#endif
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment