Add recycling of destroyed monitors

If a destroyed monitor is created again, it will be reused. This should
prevent excessive memory growth when the same monitor is created and
destroyed again.
This commit is contained in:
Markus Mäkelä
2017-08-03 09:13:20 +03:00
parent a3e9d5c327
commit 512c3c018d
6 changed files with 131 additions and 64 deletions

View File

@ -40,15 +40,17 @@ typedef enum
MONITOR_CONNECT_ATTEMPTS = 3
} monitor_timeouts_t;
MXS_MONITOR *monitor_alloc(char *, char *);
MXS_MONITOR *monitor_alloc(const char *, const char *);
void monitor_free(MXS_MONITOR *);
void monitorStart(MXS_MONITOR *, const MXS_CONFIG_PARAMETER*);
void monitorStop(MXS_MONITOR *);
void monitorDestroy(MXS_MONITOR* monitor);
void monitorStopAll();
void monitorStartAll();
MXS_MONITOR *monitor_find(const char *);
MXS_MONITOR* monitor_find_destroyed(const char *name);
void monitorShow(DCB *, MXS_MONITOR *);
void monitorShowAll(DCB *);