Introduced generic.MemoryThreshold for monitoring memory usage.