How to set the memory for the Gaussian 09 cubegen utility?
By reading the information from Gaussian about cubegen, you would find out, that use of cubegen is like the following:


  cubegen nprocs kind fchkfile cubefile npts format cubefile2


They further elaborate about nprocs:


  nprocs
  
  Number of shared memory processors used for electrostatic potential calculations. A value of 0 is equivalent to 1 (it is the default). Note that this parameter must be included if other parameters are specified. Previously this parameter was used to specify the amount of memory to allocate. The GAUSS_MEMDEF environment variable should be used instead.


You can read about setting GAUSS_MEMDEF on the site about the default.route file.


  Environment Variables
  
  All of these directives can also be set via environment variables or UNIX command line arguments. The environment variable GAUSS_XDEF provides a line equivalent to -X- in the Default.Route file. Similarly, the command line argument below specifies the same setting:
  
  $ g09 -x="value"
  
  Similarly, all of the following have the equivalent effect:
  
  Default.Route file: -M- 4GB
  bash shell: export GAUSS_MDEF=4GB
  tcsh shell: setenv GAUSS_MDEF 4GB
  command line: g09 -m="4GB" …  


Based on that, you could try the way by exporting GAUSS_MDEF to the amount that you want, or by using the commandline. But I have no idea if the latter works with cubegen instead of g09. Let me know. :)