Flutter Engine
The Flutter Engine
memory_region.cc
Go to the documentation of this file.
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
10 ASSERT(from.pointer() != nullptr && 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
void * pointer() const
Definition: memory_region.h:29
uword start() const
Definition: memory_region.h:33
uword size() const
Definition: memory_region.h:30
void CopyFrom(uword offset, const MemoryRegion &from) const
Definition: memory_region.cc:9
#define ASSERT(E)
Definition: dart_vm.cc:33
uintptr_t uword
Definition: globals.h:501
SeparatedVector2 offset