Flutter Engine
The Flutter Engine
third_party
dart-lang
sdk
runtime
vm
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
7
namespace
dart
{
8
9
void
MemoryRegion::CopyFrom
(
uword
offset
,
const
MemoryRegion
& from)
const
{
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
dart::MemoryRegion
Definition:
memory_region.h:18
dart::MemoryRegion::pointer
void * pointer() const
Definition:
memory_region.h:29
dart::MemoryRegion::start
uword start() const
Definition:
memory_region.h:33
dart::MemoryRegion::size
uword size() const
Definition:
memory_region.h:30
dart::MemoryRegion::CopyFrom
void CopyFrom(uword offset, const MemoryRegion &from) const
Definition:
memory_region.cc:9
ASSERT
#define ASSERT(E)
Definition:
entrypoints_verification_test.cc:25
memory_region.h
dart
Definition:
dart_vm.cc:33
dart::uword
uintptr_t uword
Definition:
globals.h:501
offset
SeparatedVector2 offset
Definition:
stroke_path_geometry.cc:311
Generated on Sun Jun 23 2024 21:55:43 for Flutter Engine by
1.9.4