From 89d19df43df8e7962bcf896a528d3214a3c28bbc Mon Sep 17 00:00:00 2001 From: Arseny Kapoulkine Date: Wed, 1 Oct 2014 07:02:45 +0000 Subject: Add header bit for 'name or value is shared' flag This is required to make it possible to use a pointer to one of the buffers with the document data in nodes but keep offset_debug and (more importantly) XPath document order comparison optimization working. The change increases memory page alignment to 64 bytes (so requires +32 bytes for every page allocation, which should not be a problem - even with non-default 4k pages this is <1% extra cost, with default 32k pages the overhead is 0.1%) git-svn-id: https://pugixml.googlecode.com/svn/trunk@1031 99668b35-9821-0410-8761-19e4c4f06640 --- src/pugixml.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/pugixml.hpp') diff --git a/src/pugixml.hpp b/src/pugixml.hpp index 69b2cb2..ba480cd 100644 --- a/src/pugixml.hpp +++ b/src/pugixml.hpp @@ -926,7 +926,8 @@ namespace pugi private: char_t* _buffer; - char _memory[192]; + // sizeof(xml_memory_page) + sizeof(xml_document_struct) + xml_memory_page_alignment + 1 void* in case compiler inserts padding + char _memory[sizeof(void*) * 20 + 64]; // Non-copyable semantics xml_document(const xml_document&); -- cgit v1.2.3