## Tcl8.6.17/Tk8.6.17 Documentation > Tcl C API > DumpActiveMemory

### Tcl/Tk Applications | Tcl Commands | Tk Commands | [incr Tcl] Package Commands | SQLite3 Package Commands | TDBC Package Commands | tdbc::mysql Package Commands | tdbc::odbc Package Commands | tdbc::postgres Package Commands | tdbc::sqlite3 Package Commands | Thread Package Commands | Tcl C API | Tk C API | [incr Tcl] Package C API | TDBC Package C API

  NAME
    Tcl_DumpActiveMemory, Tcl_InitMemory, Tcl_ValidateAllMemory — 妥当性確認された記憶域割当て対話機能　 Validated memory allocation interface
  SYNOPSIS
    #include <tcl.h>
    int
    Tcl_DumpActiveMemory(fileName)
    void
    Tcl_InitMemory(interp)
    void
    Tcl_ValidateAllMemory(fileName, line)
  ARGUMENTS
  説明 DESCRIPTION
  SEE ALSO
  KEYWORDS

### NAME

Tcl_DumpActiveMemory, Tcl_InitMemory, Tcl_ValidateAllMemory — 妥当性確認された記憶域割当て対話機能　 Validated memory allocation interface

### SYNOPSIS

#include <tcl.h>
int
Tcl_DumpActiveMemory(fileName)
void
Tcl_InitMemory(interp)
void
Tcl_ValidateAllMemory(fileName, line)

### ARGUMENTS

Tcl_Interp *interp (入力in)
  そこに命令を加えるべき Tcl 解釈実行機能 Tcl interpreter in which to add commands.

const char *fileName (入力in)
  Tcl_DumpActiveMemory については､記憶情報が書かれるファイルの名前｡Tcl_ValidateAllMemory については､そこから呼出がなされるファイルの名前(通常 __FILE__)｡ For Tcl_DumpActiveMemory, name of the file to which memory information will be written. For Tcl_ValidateAllMemory, name of the file from which the call is being made (normally __FILE__).

int line (入力in)
  Tcl_ValidateAllMemory への呼出がされる行数(通常 __LINE__)｡ Line number at which the call to Tcl_ValidateAllMemory is made (normally __LINE__).

### 説明 DESCRIPTION

これ等の函数は Tcl 記憶域不具合修正情報を利用できるようにする｡それは単に､ Tcl が言語翻訳時に TCL_MEM_DEBUG が定義され言語翻訳された時にのみ機能する｡ TCL_MEM_DEBUG が定義されない時､これ等の機能は全て操作なしになる｡ 　　　 These functions provide access to Tcl memory debugging information. They are only functional when Tcl has been compiled with TCL_MEM_DEBUG defined at compile-time. When TCL_MEM_DEBUG is not defined, these functions are all no-ops.

Tcl_DumpActiveMemory は全ての現在割付けられた記憶域のリストを指定されたファイルに出力する｡それぞれの割付けられた記憶域の区域の情報出力は: 初めと終わりの番地(保護領域を除く)と､寸法と､ ckalloc が区域の割付の為に呼ばれた源資ファイルと､ファイル内の行番号､である｡Tcl 解釈実行機能が削除された後の Tcl_DumpActiveMemory の呼出しに特に有用である｡ Tcl_DumpActiveMemory will output a list of all currently allocated memory to the specified file. The information output for each allocated block of memory is: starting and ending addresses (excluding guard zone), size, source file where ckalloc was called to allocate the block and line number in that file. It is especially useful to call Tcl_DumpActiveMemory after the Tcl interpreter has been deleted.

Tcl_InitMemory は interp によって与えられる解釈実行機能に Tcl の memory 命令を加える｡Tcl_InitMemory は Tcl_Main によって呼出される｡ Tcl_InitMemory adds the Tcl memory command to the interpreter given by interp. Tcl_InitMemory is called by Tcl_Main.

Tcl_ValidateAllMemory は現在割付けられた記憶域の区域の防御域の妥当性確認を強いる｡通常区域の妥当性確認はそれが解放された時に完全な妥当性確認が可能でないかぎり生じ､その場合､ ckalloc と ckfree が呼ばれた時に全ての区域の妥当性確認が起る｡この函数はどの時点でも妥当性確認を強いる｡ Tcl_ValidateAllMemory forces a validation of the guard zones of all currently allocated blocks of memory. Normally validation of a block occurs when its freed, unless full validation is enabled, in which case validation of all blocks occurs when ckalloc and ckfree are called. This function forces the validation to occur at any point.

### SEE ALSO

TCL_MEM_DEBUG, memory

### KEYWORDS

memory, debug
Copyright © 1992-1999 Karl Lehenbauer & Mark Diekhans.
Copyright © 2000 Scriptics Corporation.