Handle OOM situations in iobuf expansion

This commit is contained in:
Sergio R. Caprile committed 2025-11-05 13:53:18 -03:00
1 parent b53d8439e5
commit b8994f8bc3
9 files changed
+264 -224

No files matched your search

+2 -2
View File
@@ -9,8 +9,8 @@ struct mg_iobuf {
size_t align; // Alignment during allocation
};
int mg_iobuf_init(struct mg_iobuf *, size_t, size_t);
int mg_iobuf_resize(struct mg_iobuf *, size_t);
bool mg_iobuf_init(struct mg_iobuf *, size_t, size_t);
bool mg_iobuf_resize(struct mg_iobuf *, size_t);
void mg_iobuf_free(struct mg_iobuf *);
size_t mg_iobuf_add(struct mg_iobuf *, size_t, const void *, size_t);
size_t mg_iobuf_del(struct mg_iobuf *, size_t ofs, size_t len);