XPath: Fixed alignment issues
git-svn-id: http://pugixml.googlecode.com/svn/trunk@198 99668b35-9821-0410-8761-19e4c4f06640
This commit is contained in:
parent
3e8f9a6e2c
commit
3bf16e10b4
@ -561,6 +561,9 @@ namespace pugi
|
|||||||
|
|
||||||
void* alloc(size_t size)
|
void* alloc(size_t size)
|
||||||
{
|
{
|
||||||
|
// align size so that we're able to store pointers in subsequent blocks
|
||||||
|
size = (size + sizeof(void*) - 1) & ~(sizeof(void*) - 1);
|
||||||
|
|
||||||
if (m_root->size + size <= xpath_memory_block_size)
|
if (m_root->size + size <= xpath_memory_block_size)
|
||||||
{
|
{
|
||||||
void* buf = m_root->data + m_root->size;
|
void* buf = m_root->data + m_root->size;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user