mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-04 13:13:25 +03:00
0025418: Debug output to be limited to OCC development environment
Macros ending on "DEB" are replaced by OCCT_DEBUG across OCCT code; new macros described in documentation. Macros starting with DEB are changed to start with "OCCT_DEBUG_". Some code cleaned.
This commit is contained in:
@@ -79,7 +79,7 @@ void* NCollection_AccAllocator::Allocate(const size_t theSize)
|
||||
}
|
||||
|
||||
void* anAddress = aBlock->Allocate(aSize);
|
||||
#ifdef DEB_FINDBLOCK
|
||||
#ifdef OCCT_DEBUG_FINDBLOCK
|
||||
Key aKey;
|
||||
Standard_ASSERT_VOID(aBlock == findBlock(anAddress, aKey),
|
||||
"improper work of NCollection_AccAllocator::findBlock");
|
||||
@@ -181,7 +181,7 @@ NCollection_AccAllocator::allocateNewBlock(const Standard_Size theSize)
|
||||
mypLastBlock,
|
||||
0};
|
||||
mypLastBlock = myBlocks.Bound(getKey(anAddress), aBlock);
|
||||
#ifdef DEB_FINDBLOCK
|
||||
#ifdef OCCT_DEBUG_FINDBLOCK
|
||||
Key aKey;
|
||||
Standard_ASSERT_VOID(mypLastBlock == findBlock((Standard_Byte*)aBlock.allocStart-1, aKey),
|
||||
"improper work of NCollection_AccAllocator::findBlock");
|
||||
|
@@ -40,7 +40,7 @@ namespace
|
||||
|
||||
#define IMEM_FREE(p_bl) (size_t(p_bl->p_end_block - p_bl->p_free_space))
|
||||
|
||||
#ifdef DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
// auxiliary dummy function used to get a place where break point can be set
|
||||
inline void place_for_breakpoint() {}
|
||||
#endif
|
||||
@@ -82,7 +82,7 @@ Standard_EXPORT void IncAllocator_SetDebugFlag(const Standard_Boolean theDebug)
|
||||
IS_DEBUG = theDebug;
|
||||
}
|
||||
|
||||
#ifdef DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
|
||||
//=======================================================================
|
||||
/**
|
||||
@@ -127,7 +127,7 @@ static void Debug_Destroy(Standard_Address theAlloc)
|
||||
aMutex.Unlock();
|
||||
}
|
||||
|
||||
#endif /* DEB */
|
||||
#endif /* OCCT_DEBUG */
|
||||
|
||||
//=======================================================================
|
||||
//function : IncAllocator_PrintAlive
|
||||
@@ -182,7 +182,7 @@ NCollection_IncAllocator::NCollection_IncAllocator (const size_t theBlockSize)
|
||||
#ifdef ALLOC_TRACK_USAGE
|
||||
printf ("\n..NCollection_IncAllocator: Created (%x)\n",this);
|
||||
#endif
|
||||
#ifdef DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
if (IS_DEBUG)
|
||||
Debug_Create(this);
|
||||
#endif
|
||||
@@ -207,7 +207,7 @@ NCollection_IncAllocator::NCollection_IncAllocator (const size_t theBlockSize)
|
||||
|
||||
NCollection_IncAllocator::~NCollection_IncAllocator ()
|
||||
{
|
||||
#ifdef DEB
|
||||
#ifdef OCCT_DEBUG
|
||||
if (IS_DEBUG)
|
||||
Debug_Destroy(this);
|
||||
#endif
|
||||
|
@@ -113,7 +113,7 @@ template <class TheObjType, class TheBndType> class NCollection_UBTreeFiller
|
||||
~NCollection_UBTreeFiller ()
|
||||
{
|
||||
if (mySeqPtr.Length() > 0)
|
||||
#ifdef DEB_UBTREE
|
||||
#ifdef OCCT_DEBUG_UBTREE
|
||||
cout << "~NCollection_UBTreeFiller: " << Fill()
|
||||
<< " objects added to the tree" << endl;
|
||||
#else
|
||||
|
Reference in New Issue
Block a user