98 // Constructor |
98 // Constructor |
99 SystemProperty(const char* key, const char* value, bool writeable) { |
99 SystemProperty(const char* key, const char* value, bool writeable) { |
100 if (key == NULL) { |
100 if (key == NULL) { |
101 _key = NULL; |
101 _key = NULL; |
102 } else { |
102 } else { |
103 _key = AllocateHeap(strlen(key)+1); |
103 _key = AllocateHeap(strlen(key)+1, mtInternal); |
104 strcpy(_key, key); |
104 strcpy(_key, key); |
105 } |
105 } |
106 if (value == NULL) { |
106 if (value == NULL) { |
107 _value = NULL; |
107 _value = NULL; |
108 } else { |
108 } else { |
109 _value = AllocateHeap(strlen(value)+1); |
109 _value = AllocateHeap(strlen(value)+1, mtInternal); |
110 strcpy(_value, value); |
110 strcpy(_value, value); |
111 } |
111 } |
112 _next = NULL; |
112 _next = NULL; |
113 _writeable = writeable; |
113 _writeable = writeable; |
114 } |
114 } |
115 }; |
115 }; |
116 |
116 |
117 |
117 |
118 // For use by -agentlib, -agentpath and -Xrun |
118 // For use by -agentlib, -agentpath and -Xrun |
119 class AgentLibrary : public CHeapObj { |
119 class AgentLibrary : public CHeapObj<mtInternal> { |
120 friend class AgentLibraryList; |
120 friend class AgentLibraryList; |
121 private: |
121 private: |
122 char* _name; |
122 char* _name; |
123 char* _options; |
123 char* _options; |
124 void* _os_lib; |
124 void* _os_lib; |
134 void set_os_lib(void* os_lib) { _os_lib = os_lib; } |
134 void set_os_lib(void* os_lib) { _os_lib = os_lib; } |
135 AgentLibrary* next() const { return _next; } |
135 AgentLibrary* next() const { return _next; } |
136 |
136 |
137 // Constructor |
137 // Constructor |
138 AgentLibrary(const char* name, const char* options, bool is_absolute_path, void* os_lib) { |
138 AgentLibrary(const char* name, const char* options, bool is_absolute_path, void* os_lib) { |
139 _name = AllocateHeap(strlen(name)+1); |
139 _name = AllocateHeap(strlen(name)+1, mtInternal); |
140 strcpy(_name, name); |
140 strcpy(_name, name); |
141 if (options == NULL) { |
141 if (options == NULL) { |
142 _options = NULL; |
142 _options = NULL; |
143 } else { |
143 } else { |
144 _options = AllocateHeap(strlen(options)+1); |
144 _options = AllocateHeap(strlen(options)+1, mtInternal); |
145 strcpy(_options, options); |
145 strcpy(_options, options); |
146 } |
146 } |
147 _is_absolute_path = is_absolute_path; |
147 _is_absolute_path = is_absolute_path; |
148 _os_lib = os_lib; |
148 _os_lib = os_lib; |
149 _next = NULL; |
149 _next = NULL; |