Port to new memory model: M_MEMORY_FULL cannot return anymore
This commit is contained in:
1 parent
8939b4d046
commit
324ba5d256
3 files changed
-5
No files matched your search
@@ -414,7 +414,6 @@
|
|||||||
node_t n = M_CALL_NEW(key_oplist, struct M_F(name, _node_s)); \
|
node_t n = M_CALL_NEW(key_oplist, struct M_F(name, _node_s)); \
|
||||||
if (M_UNLIKELY_NOMEM (n == NULL)) { \
|
if (M_UNLIKELY_NOMEM (n == NULL)) { \
|
||||||
M_MEMORY_FULL(node_t, 1); \
|
M_MEMORY_FULL(node_t, 1); \
|
||||||
M_ASSERT (0); \
|
|
||||||
} \
|
} \
|
||||||
n->next = NULL; \
|
n->next = NULL; \
|
||||||
n->num = 0; \
|
n->num = 0; \
|
||||||
|
|||||||
@@ -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];
|
return &v->ptr[v->offset];
|
||||||
allocation_error:
|
allocation_error:
|
||||||
M_MEMORY_FULL(uint8_t, size_alloc);
|
M_MEMORY_FULL(uint8_t, size_alloc);
|
||||||
// NOTE: Return is currently broken.
|
|
||||||
abort();
|
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Push the byte 'c' in the bstring 'v' */
|
/* Push the byte 'c' in the bstring 'v' */
|
||||||
|
|||||||
@@ -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);
|
mem->thread_data = M_MEMORY_REALLOC(m_vlapool_lfmp_thread_ct, NULL, 0, max_thread);
|
||||||
if (M_UNLIKELY_NOMEM (mem->thread_data == NULL)) {
|
if (M_UNLIKELY_NOMEM (mem->thread_data == NULL)) {
|
||||||
M_MEMORY_FULL(m_vlapool_lfmp_thread_ct, max_thread);
|
M_MEMORY_FULL(m_vlapool_lfmp_thread_ct, max_thread);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
for(unsigned i = 0; i < max_thread;i++) {
|
for(unsigned i = 0; i < max_thread;i++) {
|
||||||
m_vlapool_lfmp_thread_init(&mem->thread_data[i]);
|
m_vlapool_lfmp_thread_init(&mem->thread_data[i]);
|
||||||
|
|||||||
Reference in new issue
Block a user