mirror of
https://github.com/corda/corda.git
synced 2025-01-03 19:54:13 +00:00
mark destination object array in System.arraycopy() if it resides in the tenured heap
This commit is contained in:
parent
64313aa243
commit
f58c6ef4e8
@ -457,6 +457,11 @@ Java_java_lang_System_arraycopy
|
||||
sbody + (srcOffset * elementSize),
|
||||
length * elementSize);
|
||||
}
|
||||
|
||||
if (classObjectMask(t, objectClass(t, d))) {
|
||||
mark(t, reinterpret_cast<object*>(dbody) + dstOffset, length);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -1417,6 +1417,17 @@ allocate(Thread* t, unsigned sizeInBytes)
|
||||
}
|
||||
}
|
||||
|
||||
inline void
|
||||
mark(Thread* t, object* targets, unsigned count)
|
||||
{
|
||||
if (t->m->heap->needsMark(reinterpret_cast<void**>(targets))) {
|
||||
ACQUIRE_RAW(t, t->m->heapLock);
|
||||
for (unsigned i = 0; i < count; ++i) {
|
||||
t->m->heap->mark(reinterpret_cast<void**>(targets + i));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
inline void
|
||||
mark(Thread* t, object& target)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user