diff options
Diffstat (limited to 'src/sat/bsat2/XAlloc.h')
-rw-r--r-- | src/sat/bsat2/XAlloc.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/sat/bsat2/XAlloc.h b/src/sat/bsat2/XAlloc.h index 1da17602..33741e33 100644 --- a/src/sat/bsat2/XAlloc.h +++ b/src/sat/bsat2/XAlloc.h @@ -34,7 +34,11 @@ static inline void* xrealloc(void *ptr, size_t size) { void* mem = realloc(ptr, size); if (mem == NULL && errno == ENOMEM){ +#ifdef __wasm + abort(); +#else throw OutOfMemoryException(); +#endif }else return mem; } |