Our approach to resource usage is that peers keep track of the resources used by each contract or on behalf of each neighboring peer, and compares it to the value provided by the contract or neighboring peer to our peer or the network. Peers or contracts with the least bang for the buck will get dropped by the peer when it is resource constrained. See [1] for how this works with contracts, and [2] for implementation.
[1] https://github.com/freenet/locutus/issues/244
[2] https://github.com/freenet/locutus/blob/3e5a31780f235e04f7b2...