Memory Allocation in Resource-Constrained Reinforcement Learning