OLD | NEW |
---|---|
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
462 global_handles->AddObjectGroup(NULL, 0, &info); | 462 global_handles->AddObjectGroup(NULL, 0, &info); |
463 ASSERT(info.has_been_disposed()); | 463 ASSERT(info.has_been_disposed()); |
464 | 464 |
465 global_handles->AddImplicitReferences( | 465 global_handles->AddImplicitReferences( |
466 Handle<HeapObject>::cast(object).location(), NULL, 0); | 466 Handle<HeapObject>::cast(object).location(), NULL, 0); |
467 } | 467 } |
468 | 468 |
469 | 469 |
470 // Here is a memory use test that uses /proc, and is therefore Linux-only. We | 470 // Here is a memory use test that uses /proc, and is therefore Linux-only. We |
471 // do not care how much memory the simulator uses, since it is only there for | 471 // do not care how much memory the simulator uses, since it is only there for |
472 // debugging purposes. | 472 // debugging purposes. Testing with ASAN doesn't make sense, either. |
473 #if defined(__linux__) && !defined(USE_SIMULATOR) | 473 #if defined(__linux__) && !defined(USE_SIMULATOR) && \ |
474 !(defined(__has_feature) && __has_feature(address_sanitizer)) | |
Sven Panne
2013/05/15 08:59:02
I had to do this check slightly different, otherwi
| |
474 | 475 |
475 | 476 |
476 static uintptr_t ReadLong(char* buffer, intptr_t* position, int base) { | 477 static uintptr_t ReadLong(char* buffer, intptr_t* position, int base) { |
477 char* end_address = buffer + *position; | 478 char* end_address = buffer + *position; |
478 uintptr_t result = strtoul(buffer + *position, &end_address, base); | 479 uintptr_t result = strtoul(buffer + *position, &end_address, base); |
479 CHECK(result != ULONG_MAX || errno != ERANGE); | 480 CHECK(result != ULONG_MAX || errno != ERANGE); |
480 CHECK(end_address > buffer + *position); | 481 CHECK(end_address > buffer + *position); |
481 *position = end_address - buffer; | 482 *position = end_address - buffer; |
482 return result; | 483 return result; |
483 } | 484 } |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
563 if (v8::internal::Snapshot::IsEnabled()) { | 564 if (v8::internal::Snapshot::IsEnabled()) { |
564 CHECK_LE(delta, 2900 * 1024); | 565 CHECK_LE(delta, 2900 * 1024); |
565 } else { | 566 } else { |
566 CHECK_LE(delta, 3400 * 1024); | 567 CHECK_LE(delta, 3400 * 1024); |
567 } | 568 } |
568 } | 569 } |
569 } | 570 } |
570 } | 571 } |
571 | 572 |
572 #endif // __linux__ and !USE_SIMULATOR | 573 #endif // __linux__ and !USE_SIMULATOR |
OLD | NEW |