diff OrthancServer/Sources/ServerContext.h @ 5152:c81f363d3aa3 malloc-trim

housekeeper thread to call malloc_trim and give back memory to the system
author Alain Mazy <am@osimis.io>
date Wed, 01 Feb 2023 18:38:39 +0100
parents 7547c7dfd017
children cddf28cfcd8d
line wrap: on
line diff
--- a/OrthancServer/Sources/ServerContext.h	Fri Jan 27 16:46:46 2023 +0100
+++ b/OrthancServer/Sources/ServerContext.h	Wed Feb 01 18:38:39 2023 +0100
@@ -187,6 +187,9 @@
     static void SaveJobsThread(ServerContext* that,
                                unsigned int sleepDelay);
 
+    static void HousekeeperThread(ServerContext* that,
+                                  unsigned int sleepDelay);
+
     void SaveJobsEngine();
 
     virtual void SignalJobSubmitted(const std::string& jobId) ORTHANC_OVERRIDE;
@@ -230,6 +233,7 @@
     SharedMessageQueue  pendingChanges_;
     boost::thread  changeThread_;
     boost::thread  saveJobsThread_;
+    boost::thread  housekeeperThread_;
         
     std::unique_ptr<SharedArchive>  queryRetrieveArchive_;
     std::string defaultLocalAet_;