Let malloc() et al. use locks only when it can