summaryrefslogtreecommitdiff
path: root/runtime/linear_alloc.h
diff options
context:
space:
mode:
author Mathieu Chartier <mathieuc@google.com> 2015-07-30 16:20:06 -0700
committer Mathieu Chartier <mathieuc@google.com> 2015-08-05 18:15:22 -0700
commit54d220eb9cc51215d75b9e0fe921b94bebbb3fd6 (patch)
treefe08749dea3ca6cad97bce48416beb37203efdf5 /runtime/linear_alloc.h
parent275bc5e5f318ba6ea1bad6c89c2924d1248b7523 (diff)
Move ArtFields and ArtMethods to be a length prefixed array
Fixes race conditions between changing method and fields arrays being seen in the wrong order by the GC. Bug: 22832610 Change-Id: Ia21d6698f73ba207a6392c3d6b9be2658933073f
Diffstat (limited to 'runtime/linear_alloc.h')
-rw-r--r--runtime/linear_alloc.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/linear_alloc.h b/runtime/linear_alloc.h
index 743ee77e17..1b21527317 100644
--- a/runtime/linear_alloc.h
+++ b/runtime/linear_alloc.h
@@ -33,7 +33,7 @@ class LinearAlloc {
// Realloc never frees the input pointer, it is the caller's job to do this if necessary.
void* Realloc(Thread* self, void* ptr, size_t old_size, size_t new_size) REQUIRES(!lock_);
- // Allocate and construct an array of structs of type T.
+ // Allocate an array of structs of type T.
template<class T>
T* AllocArray(Thread* self, size_t elements) REQUIRES(!lock_) {
return reinterpret_cast<T*>(Alloc(self, elements * sizeof(T)));