As pointed out by Regis Hanna, a considerable performance gain can be achieved by using malloc() over calloc() when allocating netlink message buffers. This is likely due to the fact that we use a complete page for each message.