2012-01-04 01:28:25 +00:00
|
|
|
// Copyright (c) 2012, 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.
|
2015-01-23 16:32:20 +00:00
|
|
|
// VMOptions=--old_gen_heap_size=512
|
2012-01-04 01:28:25 +00:00
|
|
|
|
2021-04-26 17:58:57 +00:00
|
|
|
// @dart = 2.9
|
|
|
|
|
2013-04-05 19:43:16 +00:00
|
|
|
import "package:expect/expect.dart";
|
|
|
|
|
2012-01-04 01:28:25 +00:00
|
|
|
void main() {
|
|
|
|
var number_of_ints = 134000000;
|
|
|
|
var exception_thrown = false;
|
|
|
|
try {
|
2013-02-27 08:45:04 +00:00
|
|
|
List<int> buf = new List<int>(number_of_ints);
|
2012-10-19 14:01:24 +00:00
|
|
|
} on OutOfMemoryError catch (exc) {
|
2012-01-04 01:28:25 +00:00
|
|
|
exception_thrown = true;
|
|
|
|
}
|
|
|
|
Expect.isTrue(exception_thrown);
|
|
|
|
}
|