summaryrefslogtreecommitdiffstats
path: root/lldb/source/Expression/RecordingMemoryManager.cpp
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2012-03-02 21:34:28 +0000
committerJim Ingham <jingham@apple.com>2012-03-02 21:34:28 +0000
commitbc4abcb2cb3701d591a741b9c61489e99903eab3 (patch)
tree69ec758ac327580a0372cf76685402b6d3019fb0 /lldb/source/Expression/RecordingMemoryManager.cpp
parent213ba7c7c36e6e970f5bd243e888c13f6880c739 (diff)
downloadbcm5719-llvm-bc4abcb2cb3701d591a741b9c61489e99903eab3.tar.gz
bcm5719-llvm-bc4abcb2cb3701d591a741b9c61489e99903eab3.zip
For Sean: handle the case where you are asked for a 0 byte allocation with 0 alignment.
llvm-svn: 151940
Diffstat (limited to 'lldb/source/Expression/RecordingMemoryManager.cpp')
-rw-r--r--lldb/source/Expression/RecordingMemoryManager.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/source/Expression/RecordingMemoryManager.cpp b/lldb/source/Expression/RecordingMemoryManager.cpp
index 9ff86f61df1..b7b875f5216 100644
--- a/lldb/source/Expression/RecordingMemoryManager.cpp
+++ b/lldb/source/Expression/RecordingMemoryManager.cpp
@@ -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,
OpenPOWER on IntegriCloud