mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 22:45:39 +00:00
Use detected cache line size
IBM power architecture has L1 cache line size equal to 128. Take advantage of that on that architecture, do not force more common value of 64. When it is possible to detect higher value, use that value instead. Keep the default to be 64.
This commit is contained in:
@@ -459,7 +459,7 @@ mem_create(isc_mem_t **ctxp, unsigned int flags) {
|
||||
|
||||
REQUIRE(ctxp != NULL && *ctxp == NULL);
|
||||
|
||||
ctx = mallocx(sizeof(*ctx), MALLOCX_ALIGN(ISC_OS_CACHELINE_SIZE));
|
||||
ctx = mallocx(sizeof(*ctx), MALLOCX_ALIGN(isc_os_cacheline()));
|
||||
INSIST(ctx != NULL);
|
||||
|
||||
*ctx = (isc_mem_t){
|
||||
@@ -578,7 +578,7 @@ destroy(isc_mem_t *ctx) {
|
||||
if (ctx->checkfree) {
|
||||
INSIST(malloced == 0);
|
||||
}
|
||||
sdallocx(ctx, sizeof(*ctx), MALLOCX_ALIGN(ISC_OS_CACHELINE_SIZE));
|
||||
sdallocx(ctx, sizeof(*ctx), MALLOCX_ALIGN(isc_os_cacheline()));
|
||||
}
|
||||
|
||||
void
|
||||
|
Reference in New Issue
Block a user