aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--jim-aio.c4
-rw-r--r--jim-exec.c2
-rw-r--r--jim-interactive.c6
-rw-r--r--jim.c2
4 files changed, 7 insertions, 7 deletions
diff --git a/jim-aio.c b/jim-aio.c
index ea606cc..cb56826 100644
--- a/jim-aio.c
+++ b/jim-aio.c
@@ -865,12 +865,12 @@ static int aio_cmd_copy(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
if (count >= 16384 && bufp == buf) {
/* Heuristic check - for large copy speed-up */
buflen = 65536;
- bufp = malloc(buflen);
+ bufp = Jim_Alloc(buflen);
}
}
if (bufp != buf) {
- free(bufp);
+ Jim_Free(bufp);
}
if (JimCheckStreamError(interp, af) || JimCheckStreamError(interp, outf)) {
diff --git a/jim-exec.c b/jim-exec.c
index 701ef4e..3d0793f 100644
--- a/jim-exec.c
+++ b/jim-exec.c
@@ -676,7 +676,7 @@ static int
JimCreatePipeline(Jim_Interp *interp, int argc, Jim_Obj *const *argv, phandle_t **pidArrayPtr,
int *inPipePtr, int *outPipePtr, int *errFilePtr)
{
- phandle_t *pidPtr = NULL; /* Points to malloc-ed array holding all
+ phandle_t *pidPtr = NULL; /* Points to alloc-ed array holding all
* the pids of child processes. */
int numPids = 0; /* Actual number of processes that exist
* at *pidPtr right now. */
diff --git a/jim-interactive.c b/jim-interactive.c
index 11c894a..c6490ec 100644
--- a/jim-interactive.c
+++ b/jim-interactive.c
@@ -48,13 +48,13 @@ char *Jim_HistoryGetline(Jim_Interp *interp, const char *prompt)
return result;
#else
int len;
- char *line = malloc(MAX_LINE_LEN);
+ char *line = Jim_Alloc(MAX_LINE_LEN);
fputs(prompt, stdout);
fflush(stdout);
if (fgets(line, MAX_LINE_LEN, stdin) == NULL) {
- free(line);
+ Jim_Free(line);
return NULL;
}
len = strlen(line);
@@ -246,7 +246,7 @@ int Jim_InteractivePrompt(Jim_Interp *interp)
Jim_AppendString(interp, scriptObjPtr, "\n", 1);
}
Jim_AppendString(interp, scriptObjPtr, line, -1);
- free(line);
+ Jim_Free(line);
if (Jim_ScriptIsComplete(interp, scriptObjPtr, &state))
break;
diff --git a/jim.c b/jim.c
index b984873..38d8a70 100644
--- a/jim.c
+++ b/jim.c
@@ -2502,7 +2502,7 @@ static void StringAppendString(Jim_Obj *objPtr, const char *str, int len)
if (objPtr->internalRep.strValue.maxLength < needlen ||
objPtr->internalRep.strValue.maxLength == 0) {
needlen *= 2;
- /* Inefficient to malloc() for less than 8 bytes */
+ /* Inefficient to alloc for less than 8 bytes */
if (needlen < 7) {
needlen = 7;
}