Skip to content

Commit

Permalink
Merge pull request #8367 from pshipton/rlimitdata
Browse files Browse the repository at this point in the history
Set the AIX data segment resource soft limit to the hard limit
  • Loading branch information
DanHeidinga committed Jan 23, 2020
2 parents e96e9b1 + ed28659 commit 5fcc8ec
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions runtime/vm/jvminit.c
Original file line number Diff line number Diff line change
Expand Up @@ -1870,6 +1870,22 @@ IDATA VMInitStages(J9JavaVM *vm, IDATA stage, void* reserved) {
}
#endif /* !defined(WIN32) && !defined(J9ZTPF) */

#if defined(AIXPPC)
/* Override the AIX soft limit on the data segment to avoid getting EAGAIN when creating a new thread,
* which results in an OutOfMemoryException. Also provides compatibility with IBM Java 8.
*/
{
uint64_t limit = 0;
uint32_t rc = omrsysinfo_get_limit(OMRPORT_RESOURCE_DATA | OMRPORT_LIMIT_SOFT, &limit);
if (OMRPORT_LIMIT_UNLIMITED != rc) {
uint32_t rc = omrsysinfo_get_limit(OMRPORT_RESOURCE_DATA | OMRPORT_LIMIT_HARD, &limit);
if (OMRPORT_LIMIT_UNKNOWN != rc) {
omrsysinfo_set_limit(OMRPORT_RESOURCE_DATA | OMRPORT_LIMIT_SOFT, limit);
}
}
}
#endif /* defined(AIXPPC) */

/* Parse options related to idle tuning */
{
IDATA argIndexGcOnIdleEnable = FIND_AND_CONSUME_ARG(EXACT_MATCH, VMOPT_XXIDLETUNINGGCONIDLEENABLE, NULL);
Expand Down

0 comments on commit 5fcc8ec

Please sign in to comment.