aboutsummaryrefslogtreecommitdiffstats
path: root/src/gos/gos.h
diff options
context:
space:
mode:
authorJoel Bodenmann <joel@seriouslyembedded.com>2015-11-27 20:39:28 +0100
committerJoel Bodenmann <joel@seriouslyembedded.com>2015-11-27 20:39:28 +0100
commit5a99092b794373966e444296c57991631e712c70 (patch)
tree3e2853ab9730ece7398f508238ac2707e485b346 /src/gos/gos.h
parenteaf0b19fb8428b9e2e47798294d6ba83a56d186e (diff)
parentf16ee702727a811288749a0722ddb138dd559fa8 (diff)
downloaduGFX-5a99092b794373966e444296c57991631e712c70.tar.gz
uGFX-5a99092b794373966e444296c57991631e712c70.tar.bz2
uGFX-5a99092b794373966e444296c57991631e712c70.zip
Merge branch 'master' of https://bitbucket.org/Tectu/ugfx
Diffstat (limited to 'src/gos/gos.h')
-rw-r--r--src/gos/gos.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/gos/gos.h b/src/gos/gos.h
index c3cdca50..1c4ef865 100644
--- a/src/gos/gos.h
+++ b/src/gos/gos.h
@@ -176,6 +176,23 @@
void gfxFree(void *ptr);
/**
+ * @brief Use gfxAlloc and gfxFree to implement malloc() and free()
+ *
+ * @notes Sometimes your application will include functions that
+ * want to internally use malloc() and free(). As the default
+ * implementations of these in your C library are almost
+ * invariably incorrect for an embedded platform, this option
+ * allows you to emulate those calls with gfxAlloc() and gfxFree().
+ * An example is the C library routine rand() which on many
+ * implementations internally uses malloc().
+ *
+ * @api
+ */
+ #ifndef GFX_EMULATE_MALLOC
+ #define GFX_EMULATE_MALLOC FALSE
+ #endif
+
+ /**
* @brief Yield the current thread
* @details Give up the rest of the current time slice for this thread in order to give other threads
* a chance to run.