{"id":7433,"date":"2022-12-20T19:38:05","date_gmt":"2022-12-20T22:38:05","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/tcl_dumpactivememory-man3-2\/"},"modified":"2022-12-20T19:38:05","modified_gmt":"2022-12-20T22:38:05","slug":"tcl_dumpactivememory-man3-2","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/tcl_dumpactivememory-man3-2\/","title":{"rendered":"Tcl_DumpActiveMemory (man3)"},"content":{"rendered":"<h1 align=\"center\">Tcl_DumpActiveMemory<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#ARGUMENTS\">ARGUMENTS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a><br \/> <a href=\"#KEYWORDS\">KEYWORDS<\/a> <\/p>\n<hr>\n<p>______________________________________________________________________________<\/p>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Tcl_DumpActiveMemory, Tcl_InitMemory, Tcl_ValidateAllMemory \u2212 Validated memory allocation interface<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>#include <tcl.h><\/b><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">int <b><br \/> Tcl_DumpActiveMemory<\/b>(<i>fileName<\/i>)<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">void <b><br \/> Tcl_InitMemory<\/b>(<i>interp<\/i>)<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">void <b><br \/> Tcl_ValidateAllMemory<\/b>(<i>fileName, line<\/i>)<\/p>\n<h2>ARGUMENTS <a name=\"ARGUMENTS\"><\/a> <\/h2>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"38%\">\n<p style=\"margin-top: 1em\">Tcl_Interp <i>*interp<\/i> (in)<\/p>\n<\/td>\n<td width=\"16%\"><\/td>\n<td width=\"35%\">\n<p style=\"margin-top: 1em\">Tcl interpreter in which to add commands.<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"38%\">\n<p>const char <i>*fileName<\/i> (in)<\/p>\n<\/td>\n<td width=\"16%\"><\/td>\n<td width=\"35%\">\n<p>For <b>Tcl_DumpActiveMemory<\/b>, name of the file to which memory information will be written. For <b>Tcl_ValidateAllMemory<\/b>, name of the file from which the call is being made (normally <b>__FILE__<\/b>).<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"38%\">\n<p>int <i>line<\/i> (in)<\/p>\n<\/td>\n<td width=\"16%\"><\/td>\n<td width=\"35%\">\n<p>Line number at which the call to <b>Tcl_ValidateAllMemory<\/b> is made (normally <b>__LINE__<\/b>).<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:65%;\">______________________________________________________________________________<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">These functions provide access to Tcl memory debugging information. They are only functional when Tcl has been compiled with <b>TCL_MEM_DEBUG<\/b> defined at compile-time. When <b>TCL_MEM_DEBUG<\/b> is not defined, these functions are all no-ops.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Tcl_DumpActiveMemory<\/b> 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 <b>ckalloc<\/b> was called to allocate the block and line number in that file. It is especially useful to call <b>Tcl_DumpActiveMemory<\/b> after the Tcl interpreter has been deleted.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Tcl_InitMemory<\/b> adds the Tcl <b>memory<\/b> command to the interpreter given by <i>interp<\/i>. <b>Tcl_InitMemory<\/b> is called by <b>Tcl_Main<\/b>.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Tcl_ValidateAllMemory<\/b> 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 <b>ckalloc<\/b> and <b>ckfree<\/b> are called. This function forces the validation to occur at any point.<\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">TCL_MEM_DEBUG, memory<\/p>\n<h2>KEYWORDS <a name=\"KEYWORDS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">memory, debug<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  Tcl_DumpActiveMemory, Tcl_InitMemory, Tcl_ValidateAllMemory \u2212 Validated memory allocation interface <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2536],"tags":[2538,3007,3745],"class_list":["post-7433","post","type-post","status-publish","format-standard","hentry","category-3-llamadas-de-bibliotecas","tag-2538","tag-man3","tag-tcl_initmemory"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/7433","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=7433"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/7433\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=7433"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=7433"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=7433"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}