1// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2// for details. All rights reserved. Use of this source code is governed by a
3// BSD-style license that can be found in the LICENSE file.
4
5#include "vm/memory_region.h"
6
7namespace dart {
8
9void MemoryRegion::CopyFrom(uword offset, const MemoryRegion& from) const {
10 ASSERT(from.pointer() != NULL && from.size() > 0);
11 ASSERT(this->size() >= from.size());
12 ASSERT(offset <= this->size() - from.size());
13 memmove(reinterpret_cast<void*>(start() + offset), from.pointer(),
14 from.size());
15}
16
17} // namespace dart
18