comparison 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
comparison
equal deleted inserted replaced
5149:05112ff6ba22 5152:c81f363d3aa3
185 unsigned int sleepDelay); 185 unsigned int sleepDelay);
186 186
187 static void SaveJobsThread(ServerContext* that, 187 static void SaveJobsThread(ServerContext* that,
188 unsigned int sleepDelay); 188 unsigned int sleepDelay);
189 189
190 static void HousekeeperThread(ServerContext* that,
191 unsigned int sleepDelay);
192
190 void SaveJobsEngine(); 193 void SaveJobsEngine();
191 194
192 virtual void SignalJobSubmitted(const std::string& jobId) ORTHANC_OVERRIDE; 195 virtual void SignalJobSubmitted(const std::string& jobId) ORTHANC_OVERRIDE;
193 196
194 virtual void SignalJobSuccess(const std::string& jobId) ORTHANC_OVERRIDE; 197 virtual void SignalJobSuccess(const std::string& jobId) ORTHANC_OVERRIDE;
228 bool haveJobsChanged_; 231 bool haveJobsChanged_;
229 bool isJobsEngineUnserialized_; 232 bool isJobsEngineUnserialized_;
230 SharedMessageQueue pendingChanges_; 233 SharedMessageQueue pendingChanges_;
231 boost::thread changeThread_; 234 boost::thread changeThread_;
232 boost::thread saveJobsThread_; 235 boost::thread saveJobsThread_;
236 boost::thread housekeeperThread_;
233 237
234 std::unique_ptr<SharedArchive> queryRetrieveArchive_; 238 std::unique_ptr<SharedArchive> queryRetrieveArchive_;
235 std::string defaultLocalAet_; 239 std::string defaultLocalAet_;
236 OrthancHttpHandler httpHandler_; 240 OrthancHttpHandler httpHandler_;
237 bool saveJobs_; 241 bool saveJobs_;