summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdhemerval Zanella <azanella@linux.vnet.ibm.com>2014-02-02 19:08:44 -0200
committerAdhemerval Zanella <azanella@linux.vnet.ibm.com>2014-08-07 15:16:25 -0300
commit99bfb9734fdf2a50c65817abd0fa0ce9257b9a16 (patch)
tree507e1b65c49a570bf45cc441f95d961f740be947
parent966350a187e0e21dd433229b45937683902387a4 (diff)
downloadgperftools-at8_0-release.tar.gz
Fix page_heap testcase for 64K pagesat8_0-release
This patch fixes the page_heap testcase 32-bit build when TCMALLOC_LARGE_PAGES64K is defined.
-rwxr-xr-xsrc/system-alloc.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/system-alloc.cc b/src/system-alloc.cc
index e61c087..5b7c6f7 100755
--- a/src/system-alloc.cc
+++ b/src/system-alloc.cc
@@ -524,15 +524,15 @@ bool TCMalloc_SystemRelease(void* start, size_t length) {
// Round up the starting address and round down the ending address
// to be page aligned:
- new_start = (new_start + pagesize - 1) & ~pagemask;
- new_end = new_end & ~pagemask;
+ new_start = new_end & ~pagemask;
+ new_end = (new_start + pagesize - 1) & ~pagemask;
ASSERT((new_start & pagemask) == 0);
ASSERT((new_end & pagemask) == 0);
ASSERT(new_start >= reinterpret_cast<size_t>(start));
ASSERT(new_end <= end);
- if (new_end > new_start) {
+ if (new_end >= new_start) {
int result;
do {
result = madvise(reinterpret_cast<char*>(new_start),