aboutsummaryrefslogtreecommitdiffstats
path: root/com32/include/stdlib.h
diff options
context:
space:
mode:
Diffstat (limited to 'com32/include/stdlib.h')
-rw-r--r--com32/include/stdlib.h24
1 files changed, 23 insertions, 1 deletions
diff --git a/com32/include/stdlib.h b/com32/include/stdlib.h
index 14412972..f1989539 100644
--- a/com32/include/stdlib.h
+++ b/com32/include/stdlib.h
@@ -25,7 +25,6 @@ __extern long atol(const char *);
__extern long long atoll(const char *);
__extern __noreturn exit(int);
__extern __noreturn _Exit(int);
-__extern void free(void *);
static __inline__ long labs(long __n)
{
return (__n < 0L) ? -__n : __n;
@@ -40,6 +39,29 @@ __extern __mallocfunc void *malloc(size_t);
__extern __mallocfunc void *zalloc(size_t);
__extern __mallocfunc void *calloc(size_t, size_t);
__extern __mallocfunc void *realloc(void *, size_t);
+__extern int posix_memalign(void **memptr, size_t alignment,
+ size_t size);
+
+__extern void free(void *);
+
+
+__extern void *__mem_get_tag_global();
+__extern void __mem_set_tag_global(void *tag);
+
+__extern void *__mem_get_tag(void *memptr);
+__extern void __mem_set_tag(void *memptr, void *tag);
+
+__extern void __free_tagged(void *tag);
+
+static __inline__ void *__malloc_tagged(size_t size, void *tag) {
+ void *result = malloc(size);
+ __mem_set_tag(result, tag);
+
+ return result;
+}
+
+
+
__extern long strtol(const char *, char **, int);
__extern long long strtoll(const char *, char **, int);
__extern unsigned long strtoul(const char *, char **, int);