Port to new spec M_MEMORY_FULL
This commit is contained in:
1 parent
450d2c9000
commit
1e196fe22a
21 files changed
+88
-87
No files matched your search
+2
-2
@@ -266,7 +266,7 @@ typedef struct m_worker_sync_s {
|
||||
if (!m_work3r_queue_full_p(block->worker->queue_g)) { \
|
||||
struct M_C3(m_worker_, name, _s) *p = M_MEMORY_ALLOC ( struct M_C3(m_worker_, name, _s)); \
|
||||
if (M_UNLIKELY_NOMEM(p == NULL)) { \
|
||||
M_MEMORY_FULL(sizeof (struct M_C3(m_worker_, name, _s))); \
|
||||
M_MEMORY_FULL(struct M_C3(m_worker_, name, _s), 1); \
|
||||
} \
|
||||
p->callback = callback; \
|
||||
M_MAP3(M_WORK3R_SPAWN_EXTEND_DEF_EMPLACE_FIELD_COPY, data, __VA_ARGS__) \
|
||||
@@ -411,7 +411,7 @@ m_worker_init(m_worker_t g, int numWorker, unsigned int extraQueue, void (*reset
|
||||
size_t numWorker_st = (size_t) numWorker;
|
||||
g->worker = M_MEMORY_REALLOC(m_work3r_thread_ct, NULL, 0, numWorker_st);
|
||||
if (M_UNLIKELY_NOMEM (g->worker == NULL)) {
|
||||
M_MEMORY_FULL(sizeof (m_work3r_thread_ct) * numWorker_st);
|
||||
M_MEMORY_FULL(m_work3r_thread_ct, numWorker_st);
|
||||
return;
|
||||
}
|
||||
m_work3r_queue_init(g->queue_g, numWorker_st + extraQueue);
|
||||
|
||||
Reference in new issue
Block a user