dart-sdk/runtime/vm/memory_region.cc
Ryan Macnak f9a6a5bdd2 [vm] Update NULL to nullptr in runtime/vm.
TEST=build
Change-Id: I2834ef7cf7cb7c8770f8167a2438cbedcee5c623
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/292063
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2023-04-10 18:15:12 +00:00

18 lines
602 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() != nullptr && 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