Tcl Source Code

View Ticket
Login
Ticket UUID: a12ad5c4bd7efcf22906c25feb9a7bebb0aadc5a
Title: buffer allocation on every call to Write in tclIO.c
Type: Bug Version:
Submitter: pooryorick Created on: 2022-04-20 12:03:02
Subsystem: 25. Channel System Assigned To: pooryorick
Priority: 5 Medium Severity: Minor
Status: Closed Last Modified: 2023-02-13 15:58:52
Resolution: Fixed Closed By: jan.nijtmans
    Closed on: 2023-02-13 15:58:52
Description:

In 2014, in order to resolve segmentation faults tested for by iocmd-21.[12], commit [13886141d8b3acc7] added a reference counting scheme for channel buffers. This scheme mostly negates the buffer recycling that RecycleBuffer() attempts. A better fix was not readily available, and the cost of allocating new buffers is probably usually insignificant compared to the cost of IO anyway. The result since then is that for every 4096 bytes written to a channel, a new buffer is allocated.

User Comments: pooryorick added on 2022-04-20 12:10:48:

Fixed in [a62764efd4fcdad3] and [d699b9b1453b6734].