[gimp/gimp-2-8] app: limit physical memory size by GIMP_MAX_MEMSIZE as well (cherry picked from commit c4365d4c14d1a
- From: Nils Philippsen <nphilipp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-8] app: limit physical memory size by GIMP_MAX_MEMSIZE as well (cherry picked from commit c4365d4c14d1a
- Date: Wed, 14 Nov 2012 14:25:34 +0000 (UTC)
commit 7fa86da96dc16534669949bb4141bd6e55bacaa9
Author: Nils Philippsen <nils redhat com>
Date: Tue Nov 13 16:12:56 2012 +0100
app: limit physical memory size by GIMP_MAX_MEMSIZE as well
(cherry picked from commit c4365d4c14d1a1fc35210b373119a0870458c46b)
Conflicts:
app/config/gimpbaseconfig.c
app/config/gimpbaseconfig.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/app/config/gimpbaseconfig.c b/app/config/gimpbaseconfig.c
index d643943..73a925d 100644
--- a/app/config/gimpbaseconfig.c
+++ b/app/config/gimpbaseconfig.c
@@ -43,6 +43,8 @@
#include "gimp-intl.h"
+#define GIMP_MAX_MEM_PROCESS (MIN (G_MAXSIZE, GIMP_MAX_MEMSIZE))
+
enum
{
PROP_0,
@@ -143,7 +145,7 @@ gimp_base_config_class_init (GimpBaseConfigClass *klass)
memory_size = get_physical_memory_size ();
/* limit to the amount one process can handle */
- memory_size = MIN (G_MAXSIZE, memory_size);
+ memory_size = MIN (GIMP_MAX_MEM_PROCESS, memory_size);
if (memory_size > 0)
memory_size = memory_size / 2; /* half the memory */
@@ -152,7 +154,7 @@ gimp_base_config_class_init (GimpBaseConfigClass *klass)
GIMP_CONFIG_INSTALL_PROP_MEMSIZE (object_class, PROP_TILE_CACHE_SIZE,
"tile-cache-size", TILE_CACHE_SIZE_BLURB,
- 0, MIN (G_MAXSIZE, GIMP_MAX_MEMSIZE),
+ 0, GIMP_MAX_MEM_PROCESS,
memory_size,
GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_CONFIRM);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]