summaryrefslogtreecommitdiff
path: root/libc/stdlib/malloc-standard
diff options
context:
space:
mode:
Diffstat (limited to 'libc/stdlib/malloc-standard')
-rw-r--r--libc/stdlib/malloc-standard/calloc.c4
-rw-r--r--libc/stdlib/malloc-standard/realloc.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/libc/stdlib/malloc-standard/calloc.c b/libc/stdlib/malloc-standard/calloc.c
index a67dad738..b8c43d9dc 100644
--- a/libc/stdlib/malloc-standard/calloc.c
+++ b/libc/stdlib/malloc-standard/calloc.c
@@ -54,7 +54,7 @@ void* calloc(size_t n_elements, size_t elem_size)
assert(nclears >= 3);
if (nclears > 9)
- memset(d, 0, clearsize);
+ __memset(d, 0, clearsize);
else {
*(d+0) = 0;
@@ -83,7 +83,7 @@ void* calloc(size_t n_elements, size_t elem_size)
d = (size_t*)mem;
/* Note the additional (sizeof(size_t)) */
clearsize = chunksize(p) - 2*(sizeof(size_t));
- memset(d, 0, clearsize);
+ __memset(d, 0, clearsize);
}
#endif
}
diff --git a/libc/stdlib/malloc-standard/realloc.c b/libc/stdlib/malloc-standard/realloc.c
index 195013095..3d77442af 100644
--- a/libc/stdlib/malloc-standard/realloc.c
+++ b/libc/stdlib/malloc-standard/realloc.c
@@ -126,7 +126,7 @@ void* realloc(void* oldmem, size_t bytes)
assert(ncopies >= 3);
if (ncopies > 9)
- memcpy(d, s, copysize);
+ __memcpy(d, s, copysize);
else {
*(d+0) = *(s+0);
@@ -226,7 +226,7 @@ void* realloc(void* oldmem, size_t bytes)
/* Must alloc, copy, free. */
newmem = malloc(nb - MALLOC_ALIGN_MASK);
if (newmem != 0) {
- memcpy(newmem, oldmem, oldsize - 2*(sizeof(size_t)));
+ __memcpy(newmem, oldmem, oldsize - 2*(sizeof(size_t)));
free(oldmem);
}
}