Changeset 43988 in webkit for trunk/JavaScriptCore/wtf/TCSystemAlloc.cpp
- Timestamp:
- May 21, 2009, 3:12:39 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/wtf/TCSystemAlloc.cpp
r41660 r43988 389 389 } 390 390 391 #elif HAVE(MADV_ DONTNEED)391 #elif HAVE(MADV_FREE) || HAVE(MADV_DONTNEED) 392 392 393 393 void TCMalloc_SystemRelease(void* start, size_t length) 394 394 { 395 // MADV_FREE clears the modified bit on pages, which allows 396 // them to be discarded immediately. 397 #if HAVE(MADV_FREE) 398 const int advice = MADV_FREE; 399 #else 400 const int advice = MADV_DONTNEED; 401 #endif 395 402 if (FLAGS_malloc_devmem_start) { 396 403 // It's not safe to use MADV_DONTNEED if we've been mapping … … 419 426 // doesn't matter... 420 427 while (madvise(reinterpret_cast<char*>(new_start), new_end - new_start, 421 MADV_DONTNEED) == -1 &&428 advice) == -1 && 422 429 errno == EAGAIN) { 423 430 // NOP
Note:
See TracChangeset
for help on using the changeset viewer.