diff options
Diffstat (limited to 'src/gos/gos.h')
-rw-r--r-- | src/gos/gos.h | 17 |
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. |