When calling one of my gulp task, I get "FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory".
I found in this question that I can pass a parameter to node to increase the default memory limit : node --max-old-space-size=2000  server.js. But how can I tell gulp to pass a parameter to node.exe ? Here is the list of flags I can pass to gulp, I was hoping to find one that gulp passes to node when it launches it for a task.
The task causing the issue :
var gulp = require('gulp');
var imagemin = require('gulp-imagemin');
gulp.task('imagemin', function() {
  var OUTPUT_FOLDER = '../Release_Prepared/';
  var extensionsToOptimize = ['gif', 'jpeg', 'jpg', 'png', 'svg'];
  var glob = [];
  for(var i=0; extensionsToOptimize.length; i++){
    glob.push(OUTPUT_FOLDER + '**/*.' + extensionsToOptimize[i]);
  }
  gulp.src(glob)
  .pipe(imagemin({
    verbose: true
  }))
  .pipe(gulp.dest(OUTPUT_FOLDER));
});