]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Add explanatory comment.
authorRobert Walsh <rjwalsh@valgrind.org>
Mon, 23 Aug 2004 18:15:12 +0000 (18:15 +0000)
committerRobert Walsh <rjwalsh@valgrind.org>
Mon, 23 Aug 2004 18:15:12 +0000 (18:15 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2607

coregrind/vg_main.c

index 10d50d11b05ccad999ecef2e43c672bb86ad08ae..0b28677bed91ab557520b5e65fdbdf2e8ac501c2 100644 (file)
@@ -108,6 +108,11 @@ Addr VG_(shadow_base);              /* tool's shadow memory */
 Addr VG_(shadow_end);
 
 Addr VG_(valgrind_base);        /* valgrind's address range */
+
+// VG_(valgrind_end) has a slightly different meaning to all the other
+// VG_(*_end) vars -- ie. it names the last byte, whereas the others
+// go one byte past the end.
+
 Addr VG_(valgrind_end);
 
 vki_rlimit VG_(client_rlimit_data);
@@ -432,6 +437,11 @@ static void layout_remaining_space(Addr argc_addr, float ratio)
    addr_t client_size, shadow_size;
 
    VG_(valgrind_base)  = (addr_t)&kickstart_base;
+
+   // VG_(valgrind_end) has a slightly different meaning to all the other
+   // VG_(*_end) vars -- ie. it names the last byte, whereas the others
+   // go one byte past the end.
+
    VG_(valgrind_end)   = ROUNDUP(argc_addr, 0x10000) - 1; // stack
 
    // This gives the client the largest possible address space while