summaryrefslogtreecommitdiffstats
path: root/courgette
diff options
context:
space:
mode:
authorgbillock@chromium.org <gbillock@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-25 21:26:12 +0000
committergbillock@chromium.org <gbillock@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-25 21:26:12 +0000
commit5ace0a8fdc51ec4073e1f71343f86d1e45ec20de (patch)
tree8e6808e1d9aee70eff0d87669f933dfb837e895c /courgette
parent55705ebb8d50420476c0bde088555b34f45a0f51 (diff)
downloadchromium_src-5ace0a8fdc51ec4073e1f71343f86d1e45ec20de.zip
chromium_src-5ace0a8fdc51ec4073e1f71343f86d1e45ec20de.tar.gz
chromium_src-5ace0a8fdc51ec4073e1f71343f86d1e45ec20de.tar.bz2
Add a clarifying comment to the memory layout navigation. (Inspired by Coverity CID 100022)
R=tommi@chromium.org BUG=None TEST=None Review URL: https://chromiumcodereview.appspot.com/10826014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148412 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'courgette')
-rw-r--r--courgette/memory_allocator.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/courgette/memory_allocator.cc b/courgette/memory_allocator.cc
index f2aed22..b3a45b4 100644
--- a/courgette/memory_allocator.cc
+++ b/courgette/memory_allocator.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -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);