Sanity checks on malloc