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);