diff --git a/src/box/txn.c b/src/box/txn.c index 488aa4bdd55776a764638b47f7215e4c5bf22e18..b81693c0aad09f79981b2157b85a3c5919a2ff33 100644 --- a/src/box/txn.c +++ b/src/box/txn.c @@ -54,11 +54,11 @@ static int txn_add_redo(struct txn *txn, struct txn_stmt *stmt, struct request *request) { /* Create a redo log row. */ + int size; struct xrow_header *row; - row = region_alloc_object(&txn->region, struct xrow_header); + row = region_alloc_object(&txn->region, struct xrow_header, &size); if (row == NULL) { - diag_set(OutOfMemory, sizeof(*row), - "region", "struct xrow_header"); + diag_set(OutOfMemory, size, "region_alloc_object", "row"); return -1; } if (request->header != NULL) { @@ -91,11 +91,11 @@ txn_add_redo(struct txn *txn, struct txn_stmt *stmt, struct request *request) static struct txn_stmt * txn_stmt_new(struct region *region) { + int size; struct txn_stmt *stmt; - stmt = region_alloc_object(region, struct txn_stmt); + stmt = region_alloc_object(region, struct txn_stmt, &size); if (stmt == NULL) { - diag_set(OutOfMemory, sizeof(*stmt), - "region", "struct txn_stmt"); + diag_set(OutOfMemory, size, "region_alloc_object", "stmt"); return NULL; } @@ -178,9 +178,10 @@ txn_new(void) region_create(®ion, &cord()->slabc); /* Place txn structure on the region. */ - struct txn *txn = region_alloc_object(®ion, struct txn); + int size; + struct txn *txn = region_alloc_object(®ion, struct txn, &size); if (txn == NULL) { - diag_set(OutOfMemory, sizeof(*txn), "region", "struct txn"); + diag_set(OutOfMemory, size, "region_alloc_object", "txn"); return NULL; } assert(region_used(®ion) == sizeof(*txn)); diff --git a/src/box/vy_write_iterator.c b/src/box/vy_write_iterator.c index 01962faa3ef8b348b4338b17875505ce2cf7626a..78a52ae5c591f85298792c3b57bdd2fb04eff1a7 100644 --- a/src/box/vy_write_iterator.c +++ b/src/box/vy_write_iterator.c @@ -102,9 +102,12 @@ static inline struct vy_write_history * vy_write_history_new(struct vy_entry entry, struct vy_write_history *next) { struct vy_write_history *h; - h = region_alloc_object(&fiber()->gc, struct vy_write_history); - if (h == NULL) + int size; + h = region_alloc_object(&fiber()->gc, struct vy_write_history, &size); + if (h == NULL) { + diag_set(OutOfMemory, size, "region_alloc_object", "h"); return NULL; + } h->entry = entry; assert(next == NULL || (next->entry.stmt != NULL && vy_stmt_lsn(next->entry.stmt) > vy_stmt_lsn(entry.stmt))); diff --git a/src/lib/small b/src/lib/small index 118b53334ad785ebe0534758832841dc2786fdc4..75464628e3a5e471e1b9cd07fb0d80866e58536a 160000 --- a/src/lib/small +++ b/src/lib/small @@ -1 +1 @@ -Subproject commit 118b53334ad785ebe0534758832841dc2786fdc4 +Subproject commit 75464628e3a5e471e1b9cd07fb0d80866e58536a