Restart on RAM limit

Hi,

Is there a solution to restart automatically a container if it reach a RAM consumption ?

Best regards.