Merge "Implement functions for managing Graphite memory budget." into main