[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gimp-developer
Subject:    Re: [Gimp-developer] Is there any way to free Gimp memory and avoid restarting it?
From:       Liam R E Quin <liam () holoweb ! net>
Date:       2019-02-06 20:07:33
Message-ID: 0ebe538ec2f8ab06abf2b5f1cb61ea91a7ebbb1d.camel () holoweb ! net
[Download RAW message or body]

On Wed, 2019-02-06 at 18:23 +0100, Peter Suetterlin wrote:
> By design allocators tend
> > to
> > keep freed memory around for reuse in future allocation calls,
> 
> But this is not very social to other programs running on the same
> machine, is
> it?  I have noticed this behavior of GIMP myself before, and also
> thought this is not how it should be...

It's the default behaviour for almost all programs. On Linux systems
you may be able to set M_TRIM_THRESHOLD_ to return memory to the
operating system in some circumstances, and also MALLOC_MMAP_THRESHOLD_
to make malloc() allocate memory in a way that gets reused more easily.
See the man page for mallopt.

On Unix systems (including Linux and Mac OS X) this behaviour is not
especially unfriendly: the unused space isn't necessarily kept in main
memory.

Liam


-- 
Liam Quin - web slave for https://www.fromoldbooks.org/
with fabulous vintage art and fascinating texts to read.
Click here to have the slave beaten.

_______________________________________________
gimp-developer-list mailing list
List address:    gimp-developer-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic