| ︙ | | |
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.12 2001/04/04 16:07:20 kennykb Exp $
* RCS: @(#) $Id: tclCkalloc.c,v 1.12.12.1 2001/09/27 15:09:36 dkf Exp $
*/
#include "tclInt.h"
#include "tclPort.h"
#define FALSE 0
#define TRUE 1
|
| ︙ | | |
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
|
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
|
-
+
|
return result->body;
}
char *
Tcl_AttemptDbCkalloc(size, file, line)
unsigned int size;
char *file;
CONST char *file;
int line;
{
struct mem_header *result;
if (validate_memory)
Tcl_ValidateAllMemory (file, line);
|
| ︙ | | |
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
|
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
|
-
+
|
return new;
}
char *
Tcl_AttemptDbCkrealloc(ptr, size, file, line)
char *ptr;
unsigned int size;
char *file;
CONST char *file;
int line;
{
char *new;
unsigned int copySize;
struct mem_header *memp;
if (ptr == NULL) {
|
| ︙ | | |
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
|
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
|
-
+
|
result = TclpAlloc(size);
return result;
}
char *
Tcl_AttemptDbCkalloc(size, file, line)
unsigned int size;
char *file;
CONST char *file;
int line;
{
char *result;
result = (char *) TclpAlloc(size);
return result;
}
|
| ︙ | | |
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
|
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
|
-
+
|
return result;
}
char *
Tcl_AttemptDbCkrealloc(ptr, size, file, line)
char *ptr;
unsigned int size;
char *file;
CONST char *file;
int line;
{
char *result;
result = (char *) TclpRealloc(ptr, size);
return result;
}
|
| ︙ | | |