Opened 8 years ago
Last modified 14 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 |
Description
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 6 years ago by
Milestone: | 5.1 → 5.2 |
---|
comment:2 Changed 5 years ago by
Milestone: | 5.2 → 5.3 |
---|
comment:3 Changed 4 years ago by
Milestone: | 5.3 → 5.4 |
---|
comment:4 Changed 14 months ago by
Milestone: | 5.4 → someday |
---|
Getting ready for 5.1, moving tickets which won't make it in to 5.2.