Overview
| Artifact ID: | 1d76bd826760063a14c4c55cc05650c18ee3d4b3 |
|---|---|
| Page Name: | Allocation |
| Date: | 2014-08-29 15:31:45 |
| Original User: | dgp |
| Parent: | 9cc05ab89d41ca47ed5868cfb6d350fc4fe73eb4 (diff) |
| Next | dce21d3ab66f43e188a0afaeb6d1b7c7102d747c |
Content
Source Files
Public Interface
- Tcl_GetMemoryInfo
- Tcl_ValidateAllMemory
- Tcl_DumpActiveMemory
- Tcl_DbCkalloc
- Tcl_AttemptDbCkalloc
- Tcl_DbCkfree
- Tcl_DbCkrealloc
- Tcl_AttemptDbCkrealloc
- Tcl_Alloc
- Tcl_AttemptAlloc
- Tcl_Free
- Tcl_Realloc
- Tcl_AttemptRealloc
- Tcl_InitMemory
Private Interface
- TclInitAlloc
- TclFinalizeAllocSubsystem
- TclFinalizeMemorySubsystem
- TclpAlloc
- TclpFree
- TclpRealloc
- TclFreeAllocCache
- TclThreadAllocObj
- TclThreadFreeObj
- TclFinalizeThreadAlloc
- TclFinalizeThreadAllocThread
- TclpSysAlloc
- TclpSysFree
- TclpSysRealloc
- TclInitDbCkalloc
- TclDumpMemoryInfo
Directly Depends On Public Interface Of
- Threads
- Embedding Support
- Object System and Fundamental Object Types
- Parsing and Evaluation
- Pathname Management
- Conversions From String
- Filesystem Access
- stdio.h
- ctype.h
- string.h
Directly Depends On Private Interface of
Discussion
This module handles dynamic allocation and free of memory.
The largest defect is that Tcl_Alloc takes an unsigned int argument for the number of bytes to allocate, limiting the allocation size to 4 Gib. An allocator without such a low limitation must be part of Tcl 9.
A surprising feature for many is that Tcl_Alloc panics on an allocation failure. The alternative Tcl_AttemptAlloc exists for those who wish to choose it, but much of Tcl rests on foundations that will be ripped away in any out-of-memory situation.