Port to new memory model: M_MEMORY_FULL cannot return anymore

This commit is contained in:
Patrick Pelissier committed 2025-05-07 21:02:23 +02:00
1 parent 8939b4d046
commit 324ba5d256
3 files changed
-5

No files matched your search

-1
View File
@@ -414,7 +414,6 @@
node_t n = M_CALL_NEW(key_oplist, struct M_F(name, _node_s)); \
if (M_UNLIKELY_NOMEM (n == NULL)) { \
M_MEMORY_FULL(node_t, 1); \
M_ASSERT (0); \
} \
n->next = NULL; \
n->num = 0; \
-3
View File
@@ -179,9 +179,6 @@ M_P(uint8_t *, m_bstr1ng, _fit2size, m_bstring_t v, size_t size_alloc, bool exac
return &v->ptr[v->offset];
allocation_error:
M_MEMORY_FULL(uint8_t, size_alloc);
// NOTE: Return is currently broken.
abort();
return NULL;
}
/* Push the byte 'c' in the bstring 'v' */
-1
View File
@@ -756,7 +756,6 @@ m_vlapool_init(m_vlapool_t mem, m_gc_t gc_mem)
mem->thread_data = M_MEMORY_REALLOC(m_vlapool_lfmp_thread_ct, NULL, 0, max_thread);
if (M_UNLIKELY_NOMEM (mem->thread_data == NULL)) {
M_MEMORY_FULL(m_vlapool_lfmp_thread_ct, max_thread);
return;
}
for(unsigned i = 0; i < max_thread;i++) {
m_vlapool_lfmp_thread_init(&mem->thread_data[i]);