wsd/Admin.cpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 60da8087810e349ed3185e9b4bf46219ab3685fe
Author: Pranav Kant <[email protected]>
Date:   Tue Jul 11 17:48:21 2017 +0530

    This is percentage of total sys memory, not total consumed memory
    
    Change-Id: I16b8b3d217cd0fabed83a9c63a5966cc6fe4d8fb
    (cherry picked from commit ccce64eeeffce4ebef4f3cf7bde6ab288c6a1989)
    Reviewed-on: https://gerrit.libreoffice.org/39817
    Reviewed-by: Andras Timar <[email protected]>
    Tested-by: Andras Timar <[email protected]>

diff --git a/wsd/Admin.cpp b/wsd/Admin.cpp
index 08d3916f..1e811dca 100644
--- a/wsd/Admin.cpp
+++ b/wsd/Admin.cpp
@@ -444,7 +444,7 @@ void Admin::triggerMemoryCleanup(size_t totalMem)
     float memToFreePercentage = 0;
     if ( (memToFreePercentage = (totalMem/static_cast<double>(_totalSysMem)) - 
memLimit/100.) > 0.0 )
     {
-        int memToFree = memToFreePercentage * totalMem;
+        int memToFree = memToFreePercentage * _totalSysMem;
         LOG_TRC("Memory to be freed (in kB) : " << memToFree);
         // prepare document list sorted by most idle times
         std::list<DocBasicInfo> docList = _model.getDocumentsSortedByIdle();
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to