diff options
Diffstat (limited to 'lib/System')
-rw-r--r-- | lib/System/System.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/System/System.cpp b/lib/System/System.cpp index 4964921..1f6df53 100644 --- a/lib/System/System.cpp +++ b/lib/System/System.cpp @@ -1,5 +1,6 @@ #include <sys/time.h> #include <stdint.h> +#include "stdlib.h" #include "System/System.h" // FIXME: windows support. @@ -10,6 +11,14 @@ LIBFLANG_ABI void libflang_sys_init() { gettimeofday(&programStart, nullptr); } +LIBFLANG_ABI void *libflang_malloc(size_t size) { + return malloc(size); +} + +LIBFLANG_ABI void libflang_free(void *ptr) { + free(ptr); +} + LIBFLANG_ABI float libflang_etime(float *time0, float *time1) { timeval stop; gettimeofday(&stop, nullptr); |