9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
-
+
|
* Copyright (c) 1998-1999 by Scriptics Corporation.
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
* This code contributed by Karl Lehenbauer and Mark Diekhans
*
* RCS: @(#) $Id: tclCkalloc.c,v 1.17 2002/08/01 18:32:53 mdejong Exp $
* RCS: @(#) $Id: tclCkalloc.c,v 1.18 2002/08/20 18:33:14 dgp Exp $
*/
#include "tclInt.h"
#include "tclPort.h"
#define FALSE 0
#define TRUE 1
|
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
|
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
|
-
+
-
+
|
static int ckallocInit = 0;
/*
* Prototypes for procedures defined in this file:
*/
static int CheckmemCmd _ANSI_ARGS_((ClientData clientData,
Tcl_Interp *interp, int argc, char *argv[]));
Tcl_Interp *interp, int argc, CONST char *argv[]));
static int MemoryCmd _ANSI_ARGS_((ClientData clientData,
Tcl_Interp *interp, int argc, char **argv));
Tcl_Interp *interp, int argc, CONST char **argv));
static void ValidateMemory _ANSI_ARGS_((
struct mem_header *memHeaderP, CONST char *file,
int line, int nukeGuards));
/*
*----------------------------------------------------------------------
*
|
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
|
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
|
-
+
|
*/
/* ARGSUSED */
static int
MemoryCmd (clientData, interp, argc, argv)
ClientData clientData;
Tcl_Interp *interp;
int argc;
char **argv;
CONST char **argv;
{
CONST char *fileName;
Tcl_DString buffer;
int result;
if (argc < 2) {
Tcl_AppendResult(interp, "wrong # args: should be \"",
|
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
|
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
|
-
+
|
*/
static int
CheckmemCmd(clientData, interp, argc, argv)
ClientData clientData; /* Not used. */
Tcl_Interp *interp; /* Interpreter for evaluation. */
int argc; /* Number of arguments. */
char *argv[]; /* String values of arguments. */
CONST char *argv[]; /* String values of arguments. */
{
if (argc != 2) {
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
" fileName\"", (char *) NULL);
return TCL_ERROR;
}
tclMemDumpFileName = dumpFile;
|