For Sean: handle the case where you are asked for a 0 byte allocation with 0 alignment.

llvm-svn: 151940
This commit is contained in:
Jim Ingham 2012-03-02 21:34:28 +00:00
parent 213ba7c7c3
commit bc4abcb2cb
1 changed files with 2 additions and 2 deletions

View File

@ -238,10 +238,10 @@ RecordingMemoryManager::CommitAllocations (Process &process)
lldb_private::Error err;
size_t allocation_size = ai->m_size + ai->m_alignment - 1;
size_t allocation_size = (ai->m_size ? ai->m_size : 1) + ai->m_alignment - 1;
if (allocation_size == 0)
allocation_size = 1;
allocation_size = 1;œ
ai->m_remote_allocation = process.AllocateMemory(
allocation_size,