Release memory-block-pool memory back to malloc.
authorJan Hubicka <jh@suse.cz>
Fri, 22 Nov 2019 14:37:37 +0000 (15:37 +0100)
committerJan Hubicka <hubicka@gcc.gnu.org>
Fri, 22 Nov 2019 14:37:37 +0000 (14:37 +0000)
commit9fd052e775623581d2d277a1688b9fde94cb18d2
tree7f4801c5d1bcb5f9fda27cdbfe254577322eeec0
parentf2f3dbc67b85af0f1b6c6feb529a67baf011939c
Release memory-block-pool memory back to malloc.

* ggc-page.c (ggc_collect): Call memory_block_pool::trim.
* memory-block.cc (memory_block_pool::clear_free_list): Rename to ...
(memory_block_pool::reduce_free_list): ... this one.
(memory_block_pool::trim): New static function.
* memory-block.h (memory_block_pool::freelist_size): New constant
(memory_block_pool::clear_free_list): Rename to ...
(memory_block_pool::reduce_free_list): ... this one.
(memory_block_pool::trim): Declare.

* lto.c (lto_wpa_write_files): Call memory_block_pool::trim.

From-SVN: r278616
gcc/ChangeLog
gcc/ggc-page.c
gcc/lto/ChangeLog
gcc/lto/lto.c
gcc/memory-block.cc
gcc/memory-block.h