mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 12:24:24 +00:00
17 lines
599 B
C++
17 lines
599 B
C++
// Copyright (c) 2011, 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.
|
|
|
|
#include "vm/memory_region.h"
|
|
|
|
namespace dart {
|
|
|
|
void MemoryRegion::CopyFrom(uword offset, const MemoryRegion& from) const {
|
|
ASSERT(from.pointer() != NULL && from.size() > 0);
|
|
ASSERT(this->size() >= from.size());
|
|
ASSERT(offset <= this->size() - from.size());
|
|
memmove(reinterpret_cast<void*>(start() + offset), from.pointer(),
|
|
from.size());
|
|
}
|
|
|
|
} // namespace dart
|