blob: 0b4603d553cad57cce02e7d45c1161ba9b6ac665 [file] [log] [blame]
// 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