PowerPC uses 64K page size instead of 4k for x86 and x86_64. It makes the
page_heap_test fails because the following test:
static bool HaveSystemRelease =
TCMalloc_SystemRelease(TCMalloc_SystemAlloc(kPageSize, NULL, 0), kPageSize);
will always fail if kPageSize is less than getpagesize() (the default
configuration).
The following patch fixes it by trying to allocate/deallocate an entire
page instead:
Index: src/tests/page_heap_test.cc
===================================================================
--- src/tests/page_heap_test.cc (revision 226)
+++ src/tests/page_heap_test.cc (working copy)
@@ -12,8 +12,11 @@
namespace {
+// The system will only release memory if the block size is equal or hight than
+// system page size.
static bool HaveSystemRelease =
- TCMalloc_SystemRelease(TCMalloc_SystemAlloc(kPageSize, NULL, 0),
kPageSize);
+ TCMalloc_SystemRelease(
+ TCMalloc_SystemAlloc(getpagesize(), NULL, 0), getpagesize());
static void CheckStats(const tcmalloc::PageHeap* ph,
uint64_t system_pages,
Original issue reported on code.google.com by zatr...@gmail.com on 21 Jul 2013 at 11:55
Original issue reported on code.google.com by
zatr...@gmail.com
on 21 Jul 2013 at 11:55