Reputation: 721
In a numa system when malloc is called without using set_mempolicy, what is the default mempolicy flag being used in kernel for this allocation? Is it MPOL_DEFAULT or MPOL_INTERLEAVED ?
Upvotes: 0
Views: 215
Reputation: 721
In mm/mempolicy.c
/* * run-time system-wide default policy => local allocation */
static struct mempolicy default_policy = {
.refcnt = ATOMIC_INIT(1), /* never free it */
.mode = MPOL_PREFERRED,
.flags = MPOL_F_LOCAL,
};
So default mempolicy is MPOL_PREFERRED.
Upvotes: 1