Mass Loss of Different Stellar Populations in Globular Clusters: The Case of M4