You can set the LOAD_MEMORY_MB option to limit the amount of heap memory used for loads and other similar operations. See “Memory for loads, inserts, updates, synchronizations, and deletions”.