+ """Return the maximum memory for a machine or a user.
+
+ If machine is None, return the memory available for a new
+ machine. Else, return the maximum that machine can have.
+
+ on is a dictionary from machines to booleans, whether a machine is
+ on. If None, it is recomputed. XXX make this global?
+ """
+
+ machines = getMachinesByOwner(user.username)