mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2024-12-12 10:04:14 +02:00
Use Buffer object for page buffer in PageChecksum filter.
This avoids the object needing to support allocations.
This commit is contained in:
parent
3dbf518c3a
commit
2cfbee903a
@ -231,14 +231,14 @@ pageChecksumNew(const unsigned int segmentNo, const unsigned int segmentPageTota
|
||||
FUNCTION_LOG_PARAM(STRING, fileName);
|
||||
FUNCTION_LOG_END();
|
||||
|
||||
OBJ_NEW_BEGIN(PageChecksum, .childQty = MEM_CONTEXT_QTY_MAX, .allocQty = MEM_CONTEXT_QTY_MAX)
|
||||
OBJ_NEW_BEGIN(PageChecksum, .childQty = MEM_CONTEXT_QTY_MAX)
|
||||
{
|
||||
*this = (PageChecksum)
|
||||
{
|
||||
.segmentPageTotal = segmentPageTotal,
|
||||
.pageNoOffset = segmentNo * segmentPageTotal,
|
||||
.fileName = strDup(fileName),
|
||||
.pageBuffer = memNew(PG_PAGE_SIZE_DEFAULT),
|
||||
.pageBuffer = bufPtr(bufNew(PG_PAGE_SIZE_DEFAULT)),
|
||||
.valid = true,
|
||||
.align = true,
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user