[单选题]
Two masses of $2kg$ and $4kg$ are connected with a string that passes over a pulley. They are released from rest. Energy is lost in the pulley due to friction.
When the $2kg$ mass has gained a gravitational potential energy of $E$, the $4kg$ mass has a kinetic energy of $\frac{1}{2}E$. How much energy has been lost to friction up to that point in time?