[tarantool-patches] [PATCH v3 03/14] txn: transaction memory allocation
Georgy Kirichenko
georgy at tarantool.org
Sun Jun 9 23:44:32 MSK 2019
Enable to allocate a chunk of memory on a transaction memory region.
Prerequisites: #1254
---
src/box/txn.h | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/box/txn.h b/src/box/txn.h
index f4d861824..196a7dcc1 100644
--- a/src/box/txn.h
+++ b/src/box/txn.h
@@ -393,6 +393,15 @@ txn_vdbe()
return txn->psql_txn->vdbe;
}
+/**
+ * Allocate a chunk of memory on a txn memory region.
+ */
+static inline void *
+txn_alloc(struct txn *txn, size_t size)
+{
+ return region_alloc(&txn->region, size);
+}
+
/**
* FFI bindings: do not throw exceptions, do not accept extra
* arguments
--
2.21.0
More information about the Tarantool-patches
mailing list