Overview
| Artifact ID: | b16379fa54b7f9264e4e97760aa8cccf56bcd208 |
|---|---|
| Ticket: | 2960042fffffffffffffffffffffffffffffffff
high water mark memory not shared for file I/O needs |
| User & Date: | blacksqr on 2010-03-04 13:52:28 |
Changes
- icomment:
I'm glad the clouds have parted a bit on what is going on here. It is somewhat what I thought, but I'm still dismayed. I would argue that any memory management scheme must have some sort of allocation lifecycle built in, where unused memory is at some point detected, garbage-collected and freed. Otherwise your memory management method is operationally indistinguishable from a leak, as the present example shows. Memory management is always tricky, but simply punting on garbage collection "within the universe of Tcl_Objs" seems to me like a disaster in the making. The interpreter need not wait until a malloc fails before starting a decision process about freeing internal memory. One might for example set a maximum high water mark of around 10 percent of RAM, after which Tcl_Obj memory is immediately freed after use. Or one might design an object compactor which moves in-use Tcl_Objs from blocks of otherwise unused objects so the blocks can be freed. Obviously I'm not familiar enough with Tcl's internals to give a wise and informed opinion, but as a user who wants to make expanded use of Tcl in the coming computer world where data sets and demands for efficiency will grow dramatically, this behavior seems a significant impediment.
- login: "blacksqr"
- mimetype: "text/plain"
- username: "blacksqr"