commit | 6902eeda259a5ed8fe3a5ce5cb19ba9207549d33 | [log] [tgz] |
---|---|---|
author | Damien George <damien.p.george@gmail.com> | Fri Apr 04 10:52:59 2014 +0000 |
committer | Damien George <damien.p.george@gmail.com> | Fri Apr 04 10:52:59 2014 +0000 |
tree | d018a0c7a42e03d0705efedbd116ac5de3ad886d | |
parent | 072cf022e007e03a8b850a7197585403868923ab [diff] [blame] |
py: Add m_malloc_fail function to handle memory allocation error. A malloc/realloc fail now throws MemoryError.
diff --git a/py/misc.h b/py/misc.h index 35081f1..662513e 100644 --- a/py/misc.h +++ b/py/misc.h
@@ -36,6 +36,7 @@ void *m_malloc0(int num_bytes); void *m_realloc(void *ptr, int old_num_bytes, int new_num_bytes); void m_free(void *ptr, int num_bytes); +void *m_malloc_fail(int num_bytes); int m_get_total_bytes_allocated(void); int m_get_current_bytes_allocated(void);