[gimp] app: limit physical memory size by GIMP_MAX_MEMSIZE as well
- From: Nils Philippsen <nphilipp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: limit physical memory size by GIMP_MAX_MEMSIZE as well
- Date: Tue, 13 Nov 2012 15:13:24 +0000 (UTC)
commit c4365d4c14d1a1fc35210b373119a0870458c46b
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
app/config/gimpgeglconfig.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/app/config/gimpgeglconfig.c b/app/config/gimpgeglconfig.c
index 43fd856..fa7dc5b 100644
--- a/app/config/gimpgeglconfig.c
+++ b/app/config/gimpgeglconfig.c
@@ -42,6 +42,7 @@
#define GIMP_MAX_NUM_THREADS 16
+#define GIMP_MAX_MEM_PROCESS (MIN (G_MAXSIZE, GIMP_MAX_MEMSIZE))
enum
{
@@ -143,7 +144,7 @@ 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);
+ memory_size = MIN (GIMP_MAX_MEM_PROCESS, memory_size);
if (memory_size > 0)
memory_size = memory_size / 2; /* half the memory */
@@ -152,7 +153,7 @@ gimp_gegl_config_class_init (GimpGeglConfigClass *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]