/[dtapublic]/projs/trunk/shared_source/c_tcl_base_7_5_w_mods/tclalloc.c
ViewVC logotype

Contents of /projs/trunk/shared_source/c_tcl_base_7_5_w_mods/tclalloc.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 71 - (show annotations) (download)
Sat Nov 5 11:07:06 2016 UTC (8 years ago) by dashley
File MIME type: text/plain
File size: 3906 byte(s)
Set EOL properties appropriately to facilitate simultaneous Linux and Windows development.
1 /* $Header$ */
2
3 #define MODULE_TCLALLOC
4
5 #include <malloc.h>
6
7 #include "tclalloc.h"
8
9
10 /*
11 *----------------------------------------------------------------------
12 *
13 * TclpAlloc --
14 *
15 * Allocate more memory.
16 *
17 * Results:
18 * None.
19 *
20 * Side effects:
21 * None.
22 *
23 *----------------------------------------------------------------------
24 */
25
26 char *TclpAlloc(unsigned int nbytes)
27 {
28 return (char*) malloc(nbytes);
29 }
30
31
32 /*
33 *----------------------------------------------------------------------
34 *
35 * TclpFree --
36 *
37 * Free memory.
38 *
39 * Results:
40 * None.
41 *
42 * Side effects:
43 * None.
44 *
45 *----------------------------------------------------------------------
46 */
47
48 void TclpFree(char *cp)
49 {
50 free(cp);
51 return;
52 }
53
54
55 /*
56 *----------------------------------------------------------------------
57 *
58 * TclpCalloc --
59 *
60 * Allocate array of memory.
61 *
62 * Results:
63 * None.
64 *
65 * Side effects:
66 * None.
67 *
68 *----------------------------------------------------------------------
69 */
70
71 char *TclpCalloc(size_t num, size_t size)
72 {
73 return (char*) calloc(num, size);
74 }
75
76
77 /*
78 *----------------------------------------------------------------------
79 *
80 * TclpRealloc --
81 *
82 * Reallocate memory.
83 *
84 * Results:
85 * None.
86 *
87 * Side effects:
88 * None.
89 *
90 *----------------------------------------------------------------------
91 */
92
93 char *TclpRealloc(char *cp, unsigned int nbytes)
94 {
95 return (char*) realloc(cp, nbytes);
96 }
97
98
99 /*
100 *----------------------------------------------------------------------
101 *
102 * TclpCversion --
103 *
104 * Returns the PVCS version control string for the .C file.
105 * This is a constant string and may not be modified.
106 *
107 * Side effects:
108 * None.
109 *
110 *----------------------------------------------------------------------
111 */
112
113 const char *TclpCversion(void)
114 {
115 return ("$Header$");
116 }
117
118
119 /*
120 *----------------------------------------------------------------------
121 *
122 * TclpHversion --
123 *
124 * Returns the PVCS version control string for the .H file.
125 * This is a constant string and may not be modified.
126 *
127 * Side effects:
128 * None.
129 *
130 *----------------------------------------------------------------------
131 */
132
133 const char *TclpHversion(void)
134 {
135 return (TCLALLOC_H_VERSION);
136 }
137
138
139 /*
140 * $Log: tclalloc.c,v $
141 * Revision 1.4 2001/07/15 06:44:32 dtashley
142 * Keyword expansion mistake corrected.
143 *
144 * Revision 1.3 2001/07/15 06:40:10 dtashley
145 * Adaptation of GNU arbitrary-size integer package integrated into IjuScripter
146 * and IjuConsole.
147 *
148 * Revision 1.2 2001/07/15 06:07:15 dtashley
149 * Moved out of binary mode, preparing for use with CVS.
150 */
151 /* $History: tclalloc.c $
152 *
153 * ***************** Version 1 *****************
154 * User: Dtashley Date: 1/02/01 Time: 12:16a
155 * Created in $/IjuScripter, IjuConsole/Source/Tcl Base
156 * Initial check-in.
157 */
158
159 /*************************************************************************/
160 /* Original copyright notice below. This must be retained in the */
161 /* source code. */
162 /*************************************************************************/
163
164 /*
165 * tclAlloc.c --
166 *
167 * This is a very fast storage allocator. It allocates blocks of a
168 * small number of different sizes, and keeps free lists of each size.
169 * Blocks that don't exactly fit are passed up to the next larger size.
170 * Blocks over a certain size are directly allocated from the system.
171 *
172 * Copyright (c) 1983 Regents of the University of California.
173 * Copyright (c) 1996-1997 Sun Microsystems, Inc.
174 * Copyright (c) 1998-1999 by Scriptics Corporation.
175 *
176 * Portions contributed by Chris Kingsley, Jack Jansen and Ray Johnson.
177 *
178 * See the file "license.terms" for information on usage and redistribution
179 * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
180 *
181 * RCS: @(#) $Id: tclalloc.c,v 1.4 2001/07/15 06:44:32 dtashley Exp $
182 */
183
184 /* End of tclalloc.c */

Properties

Name Value
svn:eol-style native
svn:keywords Header

dashley@gmail.com
ViewVC Help
Powered by ViewVC 1.1.25