Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Side by Side Diff: src/spaces.cc

Issue 8060052: Fix leakage of virtual address space on Linux platform. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/platform-win32.cc ('k') | test/mjsunit/mjsunit.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 334
335 if (executable == EXECUTABLE) { 335 if (executable == EXECUTABLE) {
336 ASSERT(size_executable_ >= size); 336 ASSERT(size_executable_ >= size);
337 size_executable_ -= size; 337 size_executable_ -= size;
338 } 338 }
339 if (isolate_->code_range()->contains(static_cast<Address>(base))) { 339 if (isolate_->code_range()->contains(static_cast<Address>(base))) {
340 ASSERT(executable == EXECUTABLE); 340 ASSERT(executable == EXECUTABLE);
341 isolate_->code_range()->FreeRawMemory(base, size); 341 isolate_->code_range()->FreeRawMemory(base, size);
342 } else { 342 } else {
343 ASSERT(executable == NOT_EXECUTABLE || !isolate_->code_range()->exists()); 343 ASSERT(executable == NOT_EXECUTABLE || !isolate_->code_range()->exists());
344 VirtualMemory::ReleaseRegion(base, size); 344 bool result = VirtualMemory::ReleaseRegion(base, size);
345 USE(result);
346 ASSERT(result);
345 } 347 }
346 } 348 }
347 349
348 350
349 Address MemoryAllocator::ReserveAlignedMemory(size_t size, 351 Address MemoryAllocator::ReserveAlignedMemory(size_t size,
350 size_t alignment, 352 size_t alignment,
351 VirtualMemory* controller) { 353 VirtualMemory* controller) {
352 VirtualMemory reservation(size, alignment); 354 VirtualMemory reservation(size, alignment);
353 355
354 if (!reservation.IsReserved()) return NULL; 356 if (!reservation.IsReserved()) return NULL;
(...skipping 2158 matching lines...) Expand 10 before | Expand all | Expand 10 after
2513 object->ShortPrint(); 2515 object->ShortPrint();
2514 PrintF("\n"); 2516 PrintF("\n");
2515 } 2517 }
2516 printf(" --------------------------------------\n"); 2518 printf(" --------------------------------------\n");
2517 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); 2519 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes());
2518 } 2520 }
2519 2521
2520 #endif // DEBUG 2522 #endif // DEBUG
2521 2523
2522 } } // namespace v8::internal 2524 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/platform-win32.cc ('k') | test/mjsunit/mjsunit.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698