Last time I checked, this was a quantity ;-)
Report memory as an attribute.
Deal with resource enforcement.

This exposes 4 more query parameters:
enforce_consumable_cpus
enforce_consumable_memory
enforce_consumable_virtual_memory
self.enforce_consumable_large_page_memory

Setting any or more of of these to true will create add a "#@ resource =" line
to the job description with the respective fields sets.