Commit 2b63addc authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

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.
parent 8c245456
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.
2005-02-14 Sven Neumann <sven@gimp.org>
* app/base/gimphistogram.c: allocate histogram slots in one large
......
......@@ -452,7 +452,15 @@ gimp_init_malloc (void)
#ifdef __GLIBC__
/* Tweak memory allocation so that memory allocated in chunks >= 4k
* (64x64 pixel 1bpp tile) gets returned to the system when free'd ().
* (64x64 pixel 1bpp tile) gets returned to the system when free()'d.
*
* The default value for M_MMAP_THRESHOLD in glibc-2.3 is 128k.
* This is said to be an empirically derived value that works well
* in most systems. Lowering it to 4k is thus probably not the ideal
* solution.
*
* 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);
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment