mirror of
https://github.com/intel/llvm.git
synced 2026-02-02 02:00:03 +08:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user