Port to new spec M_MEMORY_FULL

This commit is contained in:
Patrick Pelissier committed 2025-05-07 21:02:23 +02:00
1 parent 450d2c9000
commit 1e196fe22a
21 files changed
+88 -87

No files matched your search

+2 -2
View File
@@ -181,7 +181,7 @@
size_t def = d->default_size; \
/* Test for overflow of the size computation */ \
if (M_UNLIKELY_NOMEM (def > SIZE_MAX / sizeof (type) - sizeof(node_t))) { \
M_MEMORY_FULL(sizeof(node_t)+def * sizeof(type)); \
M_MEMORY_FULL(char, sizeof(node_t)+def * sizeof(type)); \
abort(); \
return NULL; \
} \
@@ -190,7 +190,7 @@
M_CALL_REALLOC(oplist, char, NULL, 0, \
sizeof(node_t) + def * sizeof(type) ); \
if (M_UNLIKELY_NOMEM (n==NULL)) { \
M_MEMORY_FULL(sizeof(node_t)+def * sizeof(type)); \
M_MEMORY_FULL(char, sizeof(node_t)+def * sizeof(type)); \
abort(); \
return NULL; \
} \