Merge branch 'np/malloc-threading'