Files
sdk/runtime/vm/spaces.h
T
koda@google.com 5e4d540c27 Corrected resubmssion of r34736.
Fix: Division by page size in NeedsGarbageCollection.
Original description:

Generalize the interface of page space controller.

Gather used/capacity/external into SpaceUsage object,
and use it for testing whether GC is needed before or
after an allocation.

This refactor does not affect policy, but prepares for:
1. Replacing promotion failure check/tracking.
2. Better growth control for external allocation.

TBR=iposva@google.com

Review URL: https://codereview.chromium.org//225303006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34747 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-04 21:04:48 +00:00

27 lines
735 B
C++

// Copyright (c) 2014, 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.
#ifndef VM_SPACES_H_
#define VM_SPACES_H_
// This file contains utilities shared by old and new space.
// TODO(koda): Create Space base class with Space::CurrentUsage().
namespace dart {
// Usage statistics for a space/generation at a particular moment in time.
struct SpaceUsage {
SpaceUsage()
: capacity_in_words(0),
used_in_words(0),
external_in_words(0) {}
intptr_t capacity_in_words;
intptr_t used_in_words;
intptr_t external_in_words;
};
} // namespace dart
#endif // VM_SPACES_H_