diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-05-05 16:12:43 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-05-05 16:12:43 -0700 |
commit | bf673b03ca52e3613b78ddf412cb99be71a4d816 (patch) | |
tree | 26efcfe7c703bd51b58733e269f79de25ef34a09 /src | |
parent | 558ac1930bf2fb014e8906408a5821c61729382a (diff) |
add test for sdl allocation, and warn when using stub malloc/free
Diffstat (limited to 'src')
-rw-r--r-- | src/library.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/library.js b/src/library.js index e984b1eb..cfe83c6e 100644 --- a/src/library.js +++ b/src/library.js @@ -3751,10 +3751,17 @@ LibraryManager.library = { * implementation (replaced by dlmalloc normally) so * not an issue. */ +#if ASSERTIONS + Runtime.warnOnce('using stub malloc (reference it from C to have the real one included)'); +#endif var ptr = Runtime.dynamicAlloc(bytes + 8); return (ptr+8) & 0xFFFFFFF8; }, - free: function(){}, + free: function() { +#if ASSERTIONS + Runtime.warnOnce('using stub free (reference it from C to have the real one included)'); +#endif +}, calloc__deps: ['malloc'], calloc: function(n, s) { |