[RESOLVED] ORA-04030: out of process memory when trying to allocate 4088 bytes (PLS CGA hp,pdzgM64_New_Link)

You see ORA-04030 errors being reported in the alert log:

ORA-04030: out of process memory when trying to allocate 16328 bytes (PLSQL Opt Pool,pdziM01_Create: New Set)
ORA-04030: out of process memory when trying to allocate 8168 bytes (kxs-heap-c,kdbmal allocation)
ORA-04030: out of process memory when trying to allocate 4088 bytes (PLS CGA hp,pdzgM64_New_Link)

ORA-4030 trace file shows available free memory.

CAUSE

This issue was researched under the following Bug:

ORA-4030: OUT OF PROCESS MEMORY 4088 BYTES (PLS CGA HP,PDZGM64_NEW_LINK)
Bug 14268943

The issue was determined to be that the process is running out of process map entries at the OS level.

SOLUTION

Please try one of the following workarounds:

Change the page count to 200k at the OS level:
        $ more /proc/sys/vm/max_map_count
        $ sysctl -w vm.max_map_count=200000

-or-

Adjust the realfree heap pagesize within the database by setting the following parameters in the init/spfile and restart the database.
        _use_realfree_heap=TRUE
        _realfree_heap_pagesize_hint = 262144

NOTE: In Oracle 12c, the parameter _realfree_heap_pagesize_hint is changed to _realfree_heap_pagesize.
In 12C, _realfree_heap_pagesize = 262144