summaryrefslogtreecommitdiff
path: root/include/malloc.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/malloc.h')
-rw-r--r--include/malloc.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/malloc.h b/include/malloc.h
index 354f153d4..05eac9fdd 100644
--- a/include/malloc.h
+++ b/include/malloc.h
@@ -183,6 +183,13 @@ extern int mallopt __MALLOC_P ((int __param, int __val));
#endif /* __MALLOC_STANDARD__ */
+/* uClibc may use malloc internally in situations where user can not be
+ * notified about out-of-memory condition. In this situation uClibc will
+ * call __uc_malloc_failed if it is non-NULL, and retry allocation
+ * if it returns. If __uc_malloc_failed is NULL, uclubc will _exit(1).
+ * NB: do not use stdio in __uc_malloc_failed handler! */
+extern void *__uc_malloc(size_t size);
+extern void (*__uc_malloc_failed)(size_t size);
#ifdef __cplusplus
} /* end of extern "C" */