From efcea3a80da7c4479d5fe168435ecc9fd06bdc72 Mon Sep 17 00:00:00 2001
From: John Turner <jturner.usa@gmail.com>
Date: Sun, 14 Sep 2025 00:16:10 -0400
Subject: Squashed 'subprojects/boost-sqlite/' content from commit 3378e35

git-subtree-dir: subprojects/boost-sqlite
git-subtree-split: 3378e353705271e569cf4ba15c467b840a39798c
---
 doc/reference/memory.adoc | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 doc/reference/memory.adoc

(limited to 'doc/reference/memory.adoc')

diff --git a/doc/reference/memory.adoc b/doc/reference/memory.adoc
new file mode 100644
index 0000000..7bf62ef
--- /dev/null
+++ b/doc/reference/memory.adoc
@@ -0,0 +1,29 @@
+== `sqlite/memory.hpp`
+
+The memory header provides C++-y access to the memory facilities of sqlite.
+
+[source,cpp,subs=+quotes]
+----
+// A tag to allow `operator new`
+struct memory_tag {};
+
+// new operators <1>
+void *operator new  ( std::size_t size, boost::sqlite::memory_tag) noexcept;
+void *operator new[]( std::size_t size, boost::sqlite::memory_tag) noexcept;
+void operator delete  ( void* ptr, boost::sqlite::memory_tag) noexcept;
+
+// A unique ptr that uses sqlite3_malloc / sqlite3_free
+template<typename T>
+using unique_ptr = std::unique_ptr<T, __implementation_detail__>;
+template<typename T, typename ... Args>
+unique_ptr<T> make_unique(Args && ... args);
+
+// Get the size of the allocated memory.
+template<typename T>
+std::size_t msize(const unique_ptr<T> & ptr);
+
+
+---
+<1> `new (sqlite::memory_tag{}) T()` uses sqlite3_malloc
+
+
-- 
cgit v1.2.3

