code: public static String[] getUlimitMemoryCommand(int memoryLimit) {
      // ulimit isn't supported on Windows
      if (WINDOWS) {
        return null;
      }
      
      return new String[] {ULIMIT_COMMAND, "-v", String.valueOf(memoryLimit)};
    }
docs: Get the Unix command for setting the maximum virtual memory available
  to a given child process. This is only relevant when we are forking a
  process from within the Mapper or the Reducer implementations.
  Also see Hadoop Pipes and Hadoop Streaming.
  
  It also checks to ensure that we are running on a *nix platform else
  (e.g. in Cygwin/Windows) it returns <code>null</code>.
  @param memoryLimit virtual memory limit
  @return a <code>String[]</code> with the ulimit command arguments or
  <code>null</code> if we are running on a non *nix platform or
  if the limit is unspecified.