On the Oracle side, some quick suggestions for reducing memory
utilization include:

(1) reducing db_block_buffers and shared_pool_size as these are the
heaviest users.

(2) reducing sort_area_size, hash_area_size and sort_direct_buffers as
these reserve memory on a per-process basis. If possible, simply set
hash_join_enabled = false and sort_direct_writes = false. sort_area_size is
usually okay at 1m.

(3) reducing the degree of intranode parallelism may help, particularly
if you are implementing a high degree of parallelism without a good reason for
doing so.