Re: [Tinycc-devel] Minimizing libtcc memory use

2024-03-08 Thread Eric Raible
First off: If you are tired of this conversation, just tell me, I get it. > > # text 32, data.rw 4, data.ro 4, bss > 4 bytes > > # memory usage: 8192 to run, 649 symbols, 2901 other, 1639290 max (bytes) > > mem_cur_size=11742 (bytes) > > > So tcc_print_stats()

Re: [Tinycc-devel] Minimizing libtcc memory use

2024-03-08 Thread grischka via Tinycc-devel
On 08.03.2024 07:30, Eric Raible wrote: I guess that I just want the numbers to add up. Using your example: 1) -DMEM_DEBUG -DCONFIG_RUNMEM_RO=0 2) your test.c 3) but I added an early return to tcc_delete() to no-op it Running: valgrind tcc -nostdlib -vv -bench -run test.c produced: tcc

Re: [Tinycc-devel] Minimizing libtcc memory use

2024-03-06 Thread Eric Raible
I'm sorry for this delayed response. I've been camping, no wifi for a minute... On Mon, Mar 4, 2024 at 3:47 AM grischka via Tinycc-devel < tinycc-devel@nongnu.org> wrote: > On 03.03.2024 21:26, Eric Raible wrote: > > > isn't there a garbage collecting done at the end to remove all the > unused

Re: [Tinycc-devel] Minimizing libtcc memory use

2024-03-04 Thread grischka via Tinycc-devel
On 03.03.2024 21:26, Eric Raible wrote: > isn't there a garbage collecting done at the end to remove all the unused stuff > to produce a binary that contains only the necessary parts ? That very well might be the case, but given that tcc_get_symbol() can be used at any time between

Re: [Tinycc-devel] Minimizing libtcc memory use

2024-03-03 Thread Eric Raible
> isn't there a garbage collecting done at the end to remove all the unused stuff > to produce a binary that contains only the necessary parts ? That very well might be the case, but given that tcc_get_symbol() can be used at any time between tcc_relocate() and tcc_delete(), it follows that _at