[gimp] app: limit the pyhsical memory size by G_MAXSIZE



commit 2b714fcb1a6c24bcaeb13b1c592a365c374f96d8
Author: Michael Natterer <mitch gimp org>
Date:   Sat Oct 13 22:44:15 2012 +0200

    app: limit the pyhsical memory size by G_MAXSIZE
    
    because one process can't handle more.

 app/config/gimpgeglconfig.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/app/config/gimpgeglconfig.c b/app/config/gimpgeglconfig.c
index e9d9edb..43fd856 100644
--- a/app/config/gimpgeglconfig.c
+++ b/app/config/gimpgeglconfig.c
@@ -142,6 +142,9 @@ gimp_gegl_config_class_init (GimpGeglConfigClass *klass)
 
   memory_size = gimp_get_physical_memory_size ();
 
+  /* limit to the amount one process can handle */
+  memory_size = MIN (G_MAXSIZE, memory_size);
+
   if (memory_size > 0)
     memory_size = memory_size / 2; /* half the memory */
   else



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]