Opened 7 years ago

Last modified 9 months ago

#1371 new defect

locative table is only grown, never shrunk

Reported by: sjamaan Owned by:
Priority: minor Milestone: someday
Component: core libraries Version: 4.12.0
Keywords: Cc:
Estimated difficulty: medium


From a quick look at the code, it looks like we only realloc the locative_table when making a locative and the table is full. In extreme cases, this means the locative table will grow and never shrink back to a manageable size.

After some consideration, I think this is not a huge issue, as on every GC, collected locatives are thrown out of the table, so the maximum size of the locative table is bounded by the heap size. Still, this is not desirable.

I think the best place to do this is at the end of update_locative_table since we're already keeping track of the table size. We may also change this function to compact the table while walking it, so we can get by with a simple realloc().

Change History (4)

comment:1 Changed 5 years ago by sjamaan

Milestone: 5.15.2

Getting ready for 5.1, moving tickets which won't make it in to 5.2.

comment:2 Changed 5 years ago by felix winkelmann

Milestone: 5.25.3

comment:3 Changed 3 years ago by sjamaan

Milestone: 5.35.4

comment:4 Changed 9 months ago by felix winkelmann

Milestone: 5.4someday
Note: See TracTickets for help on using tickets.