< prev index next >

src/share/vm/runtime/arguments.cpp

Print this page




3526         }
3527       } else {
3528         char buffer[256];
3529         jio_snprintf(buffer, sizeof(buffer), "java.awt.headless=%s", headless_env);
3530         if (!add_property(buffer)) {
3531           return JNI_ENOMEM;
3532         }
3533       }
3534     }
3535   }
3536 
3537   if (UseConcMarkSweepGC && FLAG_IS_DEFAULT(UseParNewGC) && !UseParNewGC) {
3538     // CMS can only be used with ParNew
3539     FLAG_SET_ERGO(bool, UseParNewGC, true);
3540   }
3541 
3542   if (!check_vm_args_consistency()) {
3543     return JNI_ERR;
3544   }
3545 







3546   return JNI_OK;
3547 }
3548 
3549 // Helper class for controlling the lifetime of JavaVMInitArgs
3550 // objects.  The contents of the JavaVMInitArgs are guaranteed to be
3551 // deleted on the destruction of the ScopedVMInitArgs object.
3552 class ScopedVMInitArgs : public StackObj {
3553  private:
3554   JavaVMInitArgs _args;
3555   char*          _container_name;
3556   bool           _is_set;
3557   char*          _vm_options_file_arg;
3558 
3559  public:
3560   ScopedVMInitArgs(const char *container_name) {
3561     _args.version = JNI_VERSION_1_2;
3562     _args.nOptions = 0;
3563     _args.options = NULL;
3564     _args.ignoreUnrecognized = false;
3565     _container_name = (char *)container_name;




3526         }
3527       } else {
3528         char buffer[256];
3529         jio_snprintf(buffer, sizeof(buffer), "java.awt.headless=%s", headless_env);
3530         if (!add_property(buffer)) {
3531           return JNI_ENOMEM;
3532         }
3533       }
3534     }
3535   }
3536 
3537   if (UseConcMarkSweepGC && FLAG_IS_DEFAULT(UseParNewGC) && !UseParNewGC) {
3538     // CMS can only be used with ParNew
3539     FLAG_SET_ERGO(bool, UseParNewGC, true);
3540   }
3541 
3542   if (!check_vm_args_consistency()) {
3543     return JNI_ERR;
3544   }
3545 
3546   if (!FLAG_IS_DEFAULT(HeapDir)) {
3547     if (!FLAG_IS_DEFAULT(UseNUMAInterleaving)) {
3548       log_warning(arguments) ("NUMAInterleaving is not supported when HeapDir option is used.\n");
3549     }
3550     FLAG_SET_CMDLINE(bool, UseNUMAInterleaving, false);
3551   }
3552 
3553   return JNI_OK;
3554 }
3555 
3556 // Helper class for controlling the lifetime of JavaVMInitArgs
3557 // objects.  The contents of the JavaVMInitArgs are guaranteed to be
3558 // deleted on the destruction of the ScopedVMInitArgs object.
3559 class ScopedVMInitArgs : public StackObj {
3560  private:
3561   JavaVMInitArgs _args;
3562   char*          _container_name;
3563   bool           _is_set;
3564   char*          _vm_options_file_arg;
3565 
3566  public:
3567   ScopedVMInitArgs(const char *container_name) {
3568     _args.version = JNI_VERSION_1_2;
3569     _args.nOptions = 0;
3570     _args.options = NULL;
3571     _args.ignoreUnrecognized = false;
3572     _container_name = (char *)container_name;


< prev index next >