mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-01-18 04:58:51 +02:00
Put memContextSize() in a DEBUG block.
This function is only used in unit tests so no need to include it in the release build.
This commit is contained in:
parent
cebbf0d012
commit
729d7f071d
@ -950,6 +950,8 @@ memContextPrior(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************************************************************************/
|
/**********************************************************************************************************************************/
|
||||||
|
#ifdef DEBUG
|
||||||
|
|
||||||
size_t
|
size_t
|
||||||
memContextSize(const MemContext *const this)
|
memContextSize(const MemContext *const this)
|
||||||
{
|
{
|
||||||
@ -1033,6 +1035,8 @@ memContextSize(const MemContext *const this)
|
|||||||
FUNCTION_TEST_RETURN(SIZE, (size_t)(offset - (unsigned char *)this) + total);
|
FUNCTION_TEST_RETURN(SIZE, (size_t)(offset - (unsigned char *)this) + total);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // DEBUG
|
||||||
|
|
||||||
/**********************************************************************************************************************************/
|
/**********************************************************************************************************************************/
|
||||||
void
|
void
|
||||||
memContextClean(const unsigned int tryDepth, const bool fatal)
|
memContextClean(const unsigned int tryDepth, const bool fatal)
|
||||||
|
@ -284,7 +284,9 @@ MemContext *memContextPrior(void);
|
|||||||
MemContext *memContextTop(void);
|
MemContext *memContextTop(void);
|
||||||
|
|
||||||
// Get total size of mem context and all children
|
// Get total size of mem context and all children
|
||||||
size_t memContextSize(const MemContext *this);
|
#ifdef DEBUG
|
||||||
|
size_t memContextSize(const MemContext *this);
|
||||||
|
#endif // DEBUG
|
||||||
|
|
||||||
/***********************************************************************************************************************************
|
/***********************************************************************************************************************************
|
||||||
Macros for function logging
|
Macros for function logging
|
||||||
|
Loading…
x
Reference in New Issue
Block a user