added a comment about the use of mallopt() and what could be done instead.

2005-02-15  Sven Neumann  <sven@gimp.org>

	* app/main.c (gimp_init_malloc): added a comment about the use of
	mallopt() and what could be done instead. Use the TILE_WIDTH and
	TILE_HEIGHT defines to determine the M_MMAP_THRESHOLD value.
This commit is contained in:
Sven Neumann 2005-02-15 11:19:23 +00:00 committed by Sven Neumann
parent 2b63addc8f
commit 3d0ebd0817
2 changed files with 7 additions and 3 deletions

View File

@ -1,7 +1,8 @@
2005-02-15 Sven Neumann <sven@gimp.org>
* app/main.c (gimp_init_malloc): added a comment about the use of
mallopt() and what could be done instead.
mallopt() and what could be done instead. Use the TILE_WIDTH and
TILE_HEIGHT defines to determine the M_MMAP_THRESHOLD value.
2005-02-14 Sven Neumann <sven@gimp.org>

View File

@ -37,9 +37,12 @@
#include "libgimpbase/gimpbase.h"
#include "core/core-types.h"
#include "base/tile.h"
#include "config/gimpconfig-dump.h"
#include "core/core-types.h"
#include "core/gimp.h"
#include "app_procs.h"
@ -462,7 +465,7 @@ gimp_init_malloc (void)
* An alternative to tuning this parameter would be to use
* malloc_trim(), for example after releasing a large tile-manager.
*/
mallopt (M_MMAP_THRESHOLD, 64 * 64 - 1);
mallopt (M_MMAP_THRESHOLD, TILE_WIDTH * TILE_HEIGHT);
#endif
}