Skip to content

Commit

Permalink
z: NULL initialize dataAddr field for 0 size arrays
Browse files Browse the repository at this point in the history
Update array inline allocation sequence to initialize dataAddr field
only for non-zero size arrays. Field should be left blank for zero
size arrays.

Signed-off-by: Shubham Verma <[email protected]>
  • Loading branch information
VermaSh committed Jan 29, 2025
1 parent 73af0c7 commit 2b0941c
Show file tree
Hide file tree
Showing 3 changed files with 191 additions and 132 deletions.
2 changes: 2 additions & 0 deletions runtime/compiler/env/J9ObjectModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,8 @@ J9::ObjectModel::objectAlignmentInBytes()
return (int32_t)result;
}

// TODO: add API to get minimum object size in OMR

uintptr_t
J9::ObjectModel::offsetOfContiguousArraySizeField()
{
Expand Down
1 change: 1 addition & 0 deletions runtime/compiler/env/VMJ9.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6612,6 +6612,7 @@ TR_J9VM::getObjectAlignmentInBytes()
return (I_32)result;
}

// TODO: Add API to get minimum object size

TR_ResolvedMethod *
TR_J9VM::getObjectNewInstanceImplMethod(TR_Memory * trMemory)
Expand Down
Loading

0 comments on commit 2b0941c

Please sign in to comment.