chicken-janitors
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-janitors] #1371: locative table is only grown, never shrunk


From: Chicken Trac
Subject: [Chicken-janitors] #1371: locative table is only grown, never shrunk
Date: Fri, 12 May 2017 07:39:49 -0000

#1371: locative table is only grown, never shrunk
----------------------------+-------------------------------
 Reporter:  sjamaan         |                 Owner:
     Type:  defect          |                Status:  new
 Priority:  minor           |             Milestone:  5.1
Component:  core libraries  |               Version:  4.12.0
 Keywords:                  |  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()`.

--
Ticket URL: <https://bugs.call-cc.org/ticket/1371>
CHICKEN Scheme <https://www.call-cc.org/>
CHICKEN Scheme is a compiler for the Scheme programming language.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]