diff options
author | Damien George <damien.p.george@gmail.com> | 2014-04-04 10:52:59 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-04-04 10:52:59 +0000 |
commit | 6902eeda259a5ed8fe3a5ce5cb19ba9207549d33 (patch) | |
tree | d018a0c7a42e03d0705efedbd116ac5de3ad886d /py/misc.h | |
parent | 072cf022e007e03a8b850a7197585403868923ab (diff) | |
download | micropython-6902eeda259a5ed8fe3a5ce5cb19ba9207549d33.tar.gz micropython-6902eeda259a5ed8fe3a5ce5cb19ba9207549d33.zip |
py: Add m_malloc_fail function to handle memory allocation error.
A malloc/realloc fail now throws MemoryError.
Diffstat (limited to 'py/misc.h')
-rw-r--r-- | py/misc.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -36,6 +36,7 @@ void *m_malloc(int num_bytes); 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); |