blob: 3e78a53e9315d814f432a6ddee9e388f7d1e1bcc [file] [log] [blame]
// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// @dart = 2.9
import 'dart:typed_data';
import 'package:expect/expect.dart';
final KB = 1024;
final interestingSizes = <int>[
4 * KB, // VirtualMemory::PageSize()
64 * KB, // Heap::kAllocatablePageSize
256 * KB, // Heap::kNewAllocatableSize
512 * KB, // PageSpace::kPageSize
];
main() {
for (var base in interestingSizes) {
for (var delta = -32; delta <= 32; delta++) {
final size = base + delta;
final array = new Uint8List(size);
for (var i = 0; i < size; i++) {
Expect.equals(0, array[i]);
}
}
}
}