Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Unified Diff: courgette/memory_allocator.cc

Issue 10826014: Add a clarifying comment to the memory layout navigation. (Inspired by Coverity CID 100022) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: mapping_.view() Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: courgette/memory_allocator.cc
diff --git a/courgette/memory_allocator.cc b/courgette/memory_allocator.cc
index f2aed22d589296a8f983f062f95c99b0009bdd40..8f041061bc9d59c4a65f34785db3ebe673a5b49b 100644
--- a/courgette/memory_allocator.cc
+++ b/courgette/memory_allocator.cc
@@ -135,6 +135,8 @@ bool TempMapping::Initialize(size_t size) {
void* TempMapping::memory() const {
uint8* mem = reinterpret_cast<uint8*>(mapping_.view());
+ // The 'this' pointer is written at the start of mapping_.view(), so
+ // go past it. (See Initialize()).
if (mem)
mem += sizeof(this);
DCHECK(mem);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698