summaryrefslogtreecommitdiffstatshomepage
path: root/stm
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-02-10 22:00:36 +0000
committerDamien George <damien.p.george@gmail.com>2014-02-10 22:00:36 +0000
commitb0b7518dd1fa45f59299d97b4b6f7b025c9abf7f (patch)
tree99814bcdfb1e20aa6844c4dcb3984ff86616f208 /stm
parente8d2c3cf6cf835af79d09893a367f25d5ef487cd (diff)
parent58ff93bc7c25d7d41dda28875f88652b260b9f13 (diff)
downloadmicropython-b0b7518dd1fa45f59299d97b4b6f7b025c9abf7f.tar.gz
micropython-b0b7518dd1fa45f59299d97b4b6f7b025c9abf7f.zip
Merge pull request #270 from pfalcon/down-with-calloc
Get rid of calloc().
Diffstat (limited to 'stm')
-rw-r--r--stm/malloc0.c8
-rw-r--r--stm/std.h1
2 files changed, 0 insertions, 9 deletions
diff --git a/stm/malloc0.c b/stm/malloc0.c
index 7e3f620db2..eaa436f4fb 100644
--- a/stm/malloc0.c
+++ b/stm/malloc0.c
@@ -29,14 +29,6 @@ void *realloc(void *ptr, size_t n) {
#endif
-void *calloc(size_t sz, size_t n) {
- char *ptr = malloc(sz * n);
- for (int i = 0; i < sz * n; i++) {
- ptr[i] = 0;
- }
- return ptr;
-}
-
void *malloc(size_t n) {
return gc_alloc(n);
}
diff --git a/stm/std.h b/stm/std.h
index 98c719676f..41f477d26b 100644
--- a/stm/std.h
+++ b/stm/std.h
@@ -4,7 +4,6 @@ void __assert_func(void);
void *malloc(size_t n);
void free(void *ptr);
-void *calloc(size_t sz, size_t n);
void *realloc(void *ptr, size_t n);
void *memcpy(void *dest, const void *src, size_t n);