~ubuntu-branches/ubuntu/trusty/libv8-3.14/trusty

« back to all changes in this revision

Viewing changes to test/cctest/test-mark-compact.cc

  • Committer: Package Import Robot
  • Author(s): Adam Conrad
  • Date: 2014-02-12 10:26:54 UTC
  • Revision ID: package-import@ubuntu.com-20140212102654-mh2oalg31ifhjs0g
Tags: 3.14.5.8-5ubuntu1
* 0099_powerpc_support.patch: Pull in Andrew Low's powerpc port.
* debian/rules: Enable powerpc/ppc64/ppc64el for package builds.

Show diffs side-by-side

added added

removed removed

Lines of Context:
525
525
  return memory_use;
526
526
}
527
527
 
 
528
#if defined(V8_TARGET_ARCH_PPC)
 
529
const intptr_t maxSnap64 = 3600;  // ???
 
530
const intptr_t max64     = 4000;  // ???
 
531
const intptr_t maxSnap32 = 2800;  // 2624
 
532
const intptr_t max32     = 3300;  // 3136
 
533
#else
 
534
const intptr_t maxSnap64 = 3600;  // 3396
 
535
const intptr_t max64     = 4000;  // 3948
 
536
const intptr_t maxSnap32 = 2500;  // 2400
 
537
const intptr_t max32     = 2860;  // 2760
 
538
#endif
 
539
 
528
540
 
529
541
TEST(BootUpMemoryUse) {
530
542
  intptr_t initial_memory = MemoryInUse();
539
551
    intptr_t delta = MemoryInUse() - initial_memory;
540
552
    if (sizeof(initial_memory) == 8) {
541
553
      if (v8::internal::Snapshot::IsEnabled()) {
542
 
        CHECK_LE(delta, 3600 * 1024);  // 3396.
 
554
        CHECK_LE(delta, maxSnap64 * 1024);
543
555
      } else {
544
 
        CHECK_LE(delta, 4000 * 1024);  // 3948.
 
556
        CHECK_LE(delta, max64 * 1024);
545
557
      }
546
558
    } else {
547
559
      if (v8::internal::Snapshot::IsEnabled()) {
548
 
        CHECK_LE(delta, 2500 * 1024);  // 2400.
 
560
        CHECK_LE(delta, maxSnap32 * 1024);
549
561
      } else {
550
 
        CHECK_LE(delta, 2860 * 1024);  // 2760.
 
562
        CHECK_LE(delta, max32 * 1024);
551
563
      }
552
564
    }
553
565
  }