Memory allocation checking