Overview
| Artifact ID: | 4574715a145f2c24b0a58caa6c81835a2f2c1d64 |
|---|---|
| Page Name: | Preservation |
| Date: | 2014-08-28 17:41:45 |
| Original User: | dgp |
| Parent: | e066382c0189a52e6d52623393cd8d7e44a8e68f (diff) |
| Next | 94fedf404588e07289ff5b6e459e583ee72c2943 |
Content
Source Files
Public Routines
- Tcl_Preserve
- Tcl_Release
- Tcl_EventuallyFree
Private Routines
- TclFinalizePreserve
- TclHandleCreate
- TclHandleFree
- TclHandlePreserve
- TclHandleRelease
Directly Depends On Public Routines From
Directly Depends On Private Routines From
- None
Discussion
This module provides a solution to the important problem of managing shared interest in allocated memory.
Use of mutexes is needed to be safe for general use, but harms performance.
Implementation as a linear scan suggests the solution does not scale well at all. An effort to examine alternatives was made in novem-ak-preserve-experiments.
Wherever thread isolation and refcounting can be employed instead, they probably ought to be.
Completely different approaches such as some kind of garbage collection scheme might also avoid the drawbacks here.