mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2024-12-14 10:13:05 +02:00
Rearrange members in StackTraceData struct to save memory.
This arrangement is more efficient on 64-bit systems due to alignment. There is no difference on 32-bit systems.
This commit is contained in:
parent
859b8a50fd
commit
25ee913932
@ -34,10 +34,10 @@ typedef struct StackTraceData
|
||||
LogLevel functionLogLevel;
|
||||
unsigned int tryDepth;
|
||||
|
||||
char *param;
|
||||
size_t paramSize;
|
||||
bool paramOverflow;
|
||||
bool paramLog;
|
||||
char *param;
|
||||
size_t paramSize;
|
||||
} StackTraceData;
|
||||
|
||||
static StackTraceData stackTrace[STACK_TRACE_MAX];
|
||||
|
@ -68,6 +68,10 @@ testRun(void)
|
||||
#ifdef WITH_BACKTRACE
|
||||
stackTraceInit(testExe());
|
||||
#endif
|
||||
// -------------------------------------------------------------------------------------------------------------------------
|
||||
TEST_TITLE("check size of StackTraceData");
|
||||
|
||||
TEST_RESULT_UINT(sizeof(StackTraceData), TEST_64BIT() ? 48 : 32, "check");
|
||||
|
||||
TEST_ERROR(stackTracePop("file1", "function1", false), AssertError, "assertion 'stackSize > 0' failed");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user