mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-17 17:44:40 +02:00
8153039: Command line processing should use mtCommand or mtArguments rather than mtInternal for NMT
Added mtArguments and replaced argument related usages of mtInternal with the new flag. Reviewed-by: coleenp, gtriantafill
This commit is contained in:
parent
8423e2c392
commit
f474e970ba
9 changed files with 46 additions and 44 deletions
|
@ -47,7 +47,7 @@ class ArgumentBootClassPath;
|
|||
// PathString is used as the underlying value container for a
|
||||
// SystemProperty and for the string that represents the system
|
||||
// boot class path, Arguments::_system_boot_class_path.
|
||||
class PathString : public CHeapObj<mtInternal> {
|
||||
class PathString : public CHeapObj<mtArguments> {
|
||||
protected:
|
||||
char* _value;
|
||||
public:
|
||||
|
@ -57,7 +57,7 @@ class PathString : public CHeapObj<mtInternal> {
|
|||
if (_value != NULL) {
|
||||
FreeHeap(_value);
|
||||
}
|
||||
_value = AllocateHeap(strlen(value)+1, mtInternal);
|
||||
_value = AllocateHeap(strlen(value)+1, mtArguments);
|
||||
assert(_value != NULL, "Unable to allocate space for new path value");
|
||||
if (_value != NULL) {
|
||||
strcpy(_value, value);
|
||||
|
@ -76,7 +76,7 @@ class PathString : public CHeapObj<mtInternal> {
|
|||
if (_value != NULL) {
|
||||
len += strlen(_value);
|
||||
}
|
||||
sp = AllocateHeap(len+2, mtInternal);
|
||||
sp = AllocateHeap(len+2, mtArguments);
|
||||
assert(sp != NULL, "Unable to allocate space for new append path value");
|
||||
if (sp != NULL) {
|
||||
if (_value != NULL) {
|
||||
|
@ -97,7 +97,7 @@ class PathString : public CHeapObj<mtInternal> {
|
|||
if (value == NULL) {
|
||||
_value = NULL;
|
||||
} else {
|
||||
_value = AllocateHeap(strlen(value)+1, mtInternal);
|
||||
_value = AllocateHeap(strlen(value)+1, mtArguments);
|
||||
strcpy(_value, value);
|
||||
}
|
||||
}
|
||||
|
@ -143,7 +143,7 @@ class SystemProperty : public PathString {
|
|||
if (key == NULL) {
|
||||
_key = NULL;
|
||||
} else {
|
||||
_key = AllocateHeap(strlen(key)+1, mtInternal);
|
||||
_key = AllocateHeap(strlen(key)+1, mtArguments);
|
||||
strcpy(_key, key);
|
||||
}
|
||||
_next = NULL;
|
||||
|
@ -154,7 +154,7 @@ class SystemProperty : public PathString {
|
|||
|
||||
|
||||
// For use by -agentlib, -agentpath and -Xrun
|
||||
class AgentLibrary : public CHeapObj<mtInternal> {
|
||||
class AgentLibrary : public CHeapObj<mtArguments> {
|
||||
friend class AgentLibraryList;
|
||||
public:
|
||||
// Is this library valid or not. Don't rely on os_lib == NULL as statically
|
||||
|
@ -189,12 +189,12 @@ public:
|
|||
|
||||
// Constructor
|
||||
AgentLibrary(const char* name, const char* options, bool is_absolute_path, void* os_lib) {
|
||||
_name = AllocateHeap(strlen(name)+1, mtInternal);
|
||||
_name = AllocateHeap(strlen(name)+1, mtArguments);
|
||||
strcpy(_name, name);
|
||||
if (options == NULL) {
|
||||
_options = NULL;
|
||||
} else {
|
||||
_options = AllocateHeap(strlen(options)+1, mtInternal);
|
||||
_options = AllocateHeap(strlen(options)+1, mtArguments);
|
||||
strcpy(_options, options);
|
||||
}
|
||||
_is_absolute_path = is_absolute_path;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue