diff options
author | Alan Modra <amodra@gmail.com> | 2022-07-07 22:06:55 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2022-07-09 21:35:02 +0930 |
commit | 654d6f31a644d1381c76d3d70ce3ca9f45a08597 (patch) | |
tree | c4271dfc64112bdac82ffa0d0cf8cc3eca09e402 /libtool.m4 | |
parent | a887be69963c40ced36e319e5fb14b3de4b6658b (diff) | |
download | fsf-binutils-gdb-654d6f31a644d1381c76d3d70ce3ca9f45a08597.zip fsf-binutils-gdb-654d6f31a644d1381c76d3d70ce3ca9f45a08597.tar.gz fsf-binutils-gdb-654d6f31a644d1381c76d3d70ce3ca9f45a08597.tar.bz2 |
i386 gas: don't leak op_hash or reg_hash memory
This tidies memory used by the two x86 gas string hash tables before
exiting. I'm using a two-pronged approach, firstly the obvious call
to htab_delete plus telling the libiberty/hashtab.c infrastructure to
free tuples generated by str_hash_insert, and secondly putting the x86
core_optab memory on the notes obstack. It would be possible to free
core_optab memory by using a custom hash table del_f on x86, as I do
for arc, but a later patch will move all the string hash memory to the
notes obstack.
* config/tc-i386.c (md_begin): Use notes_alloc for core_optab.
(386_md_end): New function.
* config/tc-i386.h (386_md_end): Declare.
(md_end): Define.
* hash.h (str_htab_create): Pass free as del_f.
Diffstat (limited to 'libtool.m4')
0 files changed, 0 insertions, 0 deletions