I'm with James Berry on this.  We currently have some circumstantial
evidence that 8-byte alignment might sometimes be a problem on Windows.  It
seems premature to commit code that will affect all Windows users in the
absence of clear evidence that 16-byte alignment is actually required
(ideally a document to that effect), and a clear understanding of what the
relevant circumstances are.  Even then, a FAQ might be preferable, if a
small minority of users are deemed likely to be affected.

> -----Original Message-----
> From: Ronald Landheer-Cieslak 
> [mailto:[EMAIL PROTECTED] 
> Sent: Monday, October 27, 2003 10:38 AM
> To: Xerces-C XML parser developers
> Subject: Memory (pointer) alignment on Win32 platform
> 
> 
> As of version 2.3.0, the new memory management class (XMemory) aligns 
> memory according to the value returned by 
> XMLPlatformUtils::alignPointerForNewBlockAllocation. This 
> value is 8 on
> Win32 (using MSVC6 - haven't tried with Borland or MSVC7 yet).
> 
> In a COM object we're using that uses Xerces-C for its XML 
> parsing we've
> been having some problems that I suspect are caused by this 
> alignment: the 
> debug CRTL that comes with MSVC6 aligns to an offset of 16 
> bytes and tests
> with the alignment set to 16 bytes (using 
> XML_PLATFORM_NEW_BLOCK_ALIGNMENT)
> have not reproduced the problem. Hence, I'd like to propose a 
> patch that
> sets XML_PLATFORM_NEW_BLOCK_ALIGNMENT to 16 on Windows.
> 
> Before I do that, I need to know the following:
> * should I patch Win32Defs.hpp or some other file (like, e.g. 
> MVSCPPDefs.hpp)
> * would such a patch be acceptable?
> 
> The test case used can't be published because the code is 
> proprietary. I should
> say that the bug appears random and appears after a very, 
> very long time using
> the component with 5 separate concurrent clients, using 
> mostly the DOM parser.
> 
> rlc
> 
> NB: this does not affect the previous thread that questions 
> the way Xerces 
>     should deal with XML_PLATFORM_NEW_BLOCK_ALIGNMENT < sizeof(void*)
> 
> -- 
> Can anyone remember when the times were not hard, and money 
> not scarce?

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to