Reviewed by Maciej Stachowiak.
* wtf/TCSystemAlloc.cpp:
(TCMalloc_SystemRelease): Return after releasing memory rather than potentially falling
through into another mechanism if multiple are supported.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@28742
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2007-12-14 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ Don't use the MADV_DONTNEED code path for now as it has no effect on Mac OS X and is
+ currently untested on other platforms.
+
+ * wtf/TCSystemAlloc.cpp:
+ (TCMalloc_SystemRelease): Return after releasing memory rather than potentially falling
+ through into another mechanism if multiple are supported.
+
2007-12-14 Alp Toker <alp@atoker.com>
Build fix for GTK+/Qt and ports that don't use AllInOneFile.cpp.
return NULL;
}
-#ifndef MADV_DONTNEED
-void TCMalloc_SystemRelease(void*, size_t) {
-#else
-void TCMalloc_SystemRelease(void* start, size_t length) {
+void TCMalloc_SystemRelease(void* start, size_t length)
+{
+ UNUSED_PARAM(start);
+ UNUSED_PARAM(length);
+#if HAVE(MADV_DONTNEED)
if (FLAGS_malloc_devmem_start) {
// It's not safe to use MADV_DONTNEED if we've been mapping
// /dev/mem for heap memory
errno == EAGAIN) {
// NOP
}
+ return;
}
#endif
UNUSED_PARAM(newAddress);
// If the mmap failed then that's ok, we just won't return the memory to the system.
ASSERT(newAddress == start || newAddress == reinterpret_cast<void*>(MAP_FAILED));
+ return;
#endif
}