mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-29 10:58:22 +08:00
mdbx: roundup buffer size inside env_copy2fd().
Change-Id: Iaa9d1adb934d36a28be3804683ffbaf43552d54b
This commit is contained in:
parent
4d692821cb
commit
8861f1377c
@ -13087,8 +13087,9 @@ int __cold mdbx_env_copy2fd(MDBX_env *env, mdbx_filehandle_t fd,
|
||||
}
|
||||
|
||||
const size_t buffer_size =
|
||||
pgno2bytes(env, NUM_METAS) +
|
||||
((flags & MDBX_CP_COMPACT) ? MDBX_WBUF * 2 : MDBX_WBUF);
|
||||
mdbx_roundup2(pgno2bytes(env, NUM_METAS) +
|
||||
((flags & MDBX_CP_COMPACT) ? MDBX_WBUF * 2 : MDBX_WBUF),
|
||||
env->me_os_psize);
|
||||
|
||||
uint8_t *buffer = NULL;
|
||||
int rc = mdbx_memalign_alloc(env->me_os_psize, buffer_size, (void **)&buffer);
|
||||
|
Loading…
x
Reference in New Issue
Block a user