1
0
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:
David Steele 2022-12-30 18:45:11 +07:00
parent cebbf0d012
commit 729d7f071d
2 changed files with 7 additions and 1 deletions

View File

@ -950,6 +950,8 @@ memContextPrior(void)
}
/**********************************************************************************************************************************/
#ifdef DEBUG
size_t
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);
}
#endif // DEBUG
/**********************************************************************************************************************************/
void
memContextClean(const unsigned int tryDepth, const bool fatal)

View File

@ -284,7 +284,9 @@ MemContext *memContextPrior(void);
MemContext *memContextTop(void);
// 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