Use jemalloc_ffs() rather than ffs().
This commit is contained in:
parent
0313607e66
commit
b946086b08
16
src/chunk.c
16
src/chunk.c
@ -539,13 +539,21 @@ chunk_boot(void)
|
|||||||
SYSTEM_INFO info;
|
SYSTEM_INFO info;
|
||||||
GetSystemInfo(&info);
|
GetSystemInfo(&info);
|
||||||
|
|
||||||
/* Verify actual page size is equal to or an integral multiple of configured page size */
|
/*
|
||||||
|
* Verify actual page size is equal to or an integral multiple of
|
||||||
|
* configured page size.
|
||||||
|
*/
|
||||||
if (info.dwPageSize & ((1U << LG_PAGE) - 1))
|
if (info.dwPageSize & ((1U << LG_PAGE) - 1))
|
||||||
return (true);
|
return (true);
|
||||||
|
|
||||||
/* Configure chunksize (if not set) to match granularity (usually 64K), so pages_map will always take fast path */
|
/*
|
||||||
if (!opt_lg_chunk)
|
* Configure chunksize (if not set) to match granularity (usually 64K),
|
||||||
opt_lg_chunk = ffs((int)info.dwAllocationGranularity) - 1;
|
* so pages_map will always take fast path.
|
||||||
|
*/
|
||||||
|
if (!opt_lg_chunk) {
|
||||||
|
opt_lg_chunk = jemalloc_ffs((int)info.dwAllocationGranularity)
|
||||||
|
- 1;
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
if (!opt_lg_chunk)
|
if (!opt_lg_chunk)
|
||||||
opt_lg_chunk = LG_CHUNK_DEFAULT;
|
opt_lg_chunk = LG_CHUNK_DEFAULT;
|
||||||
|
Loading…
Reference in New Issue
Block a user