Github user bryancall commented on a diff in the pull request: https://github.com/apache/trafficserver/pull/1063#discussion_r83498036 --- Diff: proxy/Main.cc --- @@ -346,6 +346,54 @@ class DiagsLogContinuation : public Continuation } }; +class MemoryLimit : public Continuation +{ +public: + MemoryLimit() : Continuation(new_ProxyMutex()), _memory_limit(0) { SET_HANDLER(&MemoryLimit::periodic); } + ~MemoryLimit() { mutex = NULL; } + int + periodic(int event, Event *e) + { + if (event == EVENT_IMMEDIATE) { + // rescheduled from periodic to immediate event + // this is the indication to terminate + delete this; + return EVENT_DONE; + } + if (_memory_limit == 0) { + // first time it has been run + _memory_limit = REC_ConfigReadInteger("proxy.config.memory.max_usage"); --- End diff -- I don't have an event scheduled if it is not configured. I thought it would be nice to not have an event scheduled every 1 second if someone doesn't have it configured.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---