Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
change to reserved memory
Browse files Browse the repository at this point in the history
  • Loading branch information
ylwu-amzn committed Dec 21, 2020
1 parent aaced0b commit ce0654c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public void setThresholdModelTrained(String taskId, boolean trained) {
long cacheSize = trainingDataMemorySize(size);
taskCache.getThresholdModelTrainingData().clear();
taskCache.getCacheMemorySize().getAndAdd(-cacheSize);
memoryTracker.releaseMemory(cacheSize, false, HISTORICAL_SINGLE_ENTITY_DETECTOR);
memoryTracker.releaseMemory(cacheSize, true, HISTORICAL_SINGLE_ENTITY_DETECTOR);
}
}

Expand Down Expand Up @@ -220,7 +220,7 @@ private long calculateADTaskCacheSize(ADTask adTask) {
*/
public void remove(String taskId) {
if (contains(taskId)) {
memoryTracker.releaseMemory(getBatchTaskCache(taskId).getCacheMemorySize().get(), false, HISTORICAL_SINGLE_ENTITY_DETECTOR);
memoryTracker.releaseMemory(getBatchTaskCache(taskId).getCacheMemorySize().get(), true, HISTORICAL_SINGLE_ENTITY_DETECTOR);
taskCaches.remove(taskId);
}
}
Expand Down

0 comments on commit ce0654c

Please sign in to comment.