On Thu, Oct 23, 2003 at 06:24:34AM -0700, James Berry wrote: > I don't particularly like the idea of overloading the alignment define > to serve a completely different purpose. Yes, 0 is an illegal value for > this define, (it would presumably result in a divide by zero as we take > ptrSize % alignment). But that doesn't mean it's a good idea to > overload the illegal value for this define in order to imply something > completely different about how XMemory should function. > > So: if we need to alter the way XMemory works, we should come up with a > separate mechanism for doing that. > > But: You haven't convinced me that any of this is necessary. > > I was the person who initially brought up the issue of the pointer > alignment, and I'm still somewhat bothered by the need to tack on the > block header. But I'm not sure we should further complicate this code > with yet another option...when it hasn't been shown that there is any > reason to do so. > > Do you have any compelling reason why we need this additional option? > An answer that "MSVC uses 16 byte alignment" is not sufficient for me: > my answer would simply be "then we've got a bug in the MSVC port, don't > we? (where we might presumably need to set > XML_PLATFORM_NEW_BLOCK_ALIGNMENT to 16)". > > You brought up this issue because you'd seen some instability in your > code. Have you shown that: > > (a) This issue is due to the block header or pointer alignment? > (b) This issue can't be fixed by setting > XML_PLATFORM_NEW_BLOCK_ALIGNMENT? FWIW, I'm running tests with 16-byte alignments (delayed because of the birth of my daughter). I'll probably have results after the week-end. I have not proven so far that the alignment is actually the problem, but it does bother me (I have a gut feeling that it might be the problem, which is why I'm running a 16-byte aligned test).
As for the 0-byte alignment: it bein illegal is documented in /dev/null and pretty har to find. It being suggested to me as a solution kinda shows that. The patch is intended to make it work properly, and is intended to provide an easy "quick fix" for platforms for which the proper alignment is hard to find for some reason (missing documentation, no time to experiment, etc.) If you want a separate system, such a system can be devised w/o too much trouble. As for convincing you that such a system is necessary: it will come in handy w/o the shadow of a doubt, but it is not a requirement in the strict sense of the term as that it will make any value < the pointer size legal - it just gives some easily documentable and handy properties to not aligning, which IMHO is the behaviour one would expect from setting XML_PLATFORM_NEW_BLOCK_ALIGNMENT to 0. rlc --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]