py/runtime: Mark m_malloc_fail() as NORETURN.

This commit is contained in:
Damien George 2017-07-04 02:12:36 +10:00
parent 9aeba3e41b
commit 2138258fea
2 changed files with 2 additions and 2 deletions

View File

@ -92,7 +92,7 @@ void *m_realloc(void *ptr, size_t new_num_bytes);
void *m_realloc_maybe(void *ptr, size_t new_num_bytes, bool allow_move);
void m_free(void *ptr);
#endif
void *m_malloc_fail(size_t num_bytes);
NORETURN void *m_malloc_fail(size_t num_bytes);
#if MICROPY_MEM_STATS
size_t m_get_total_bytes_allocated(void);

View File

@ -1408,7 +1408,7 @@ mp_obj_t mp_parse_compile_execute(mp_lexer_t *lex, mp_parse_input_kind_t parse_i
#endif // MICROPY_ENABLE_COMPILER
void *m_malloc_fail(size_t num_bytes) {
NORETURN void *m_malloc_fail(size_t num_bytes) {
DEBUG_printf("memory allocation failed, allocating %u bytes\n", (uint)num_bytes);
if (0) {
// dummy