15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "classfile/classLoader.hpp"
27 #include "classfile/classLoaderData.inline.hpp"
28 #include "classfile/sharedPathsMiscInfo.hpp"
29 #include "logging/log.hpp"
30 #include "logging/logStream.hpp"
31 #include "memory/allocation.inline.hpp"
32 #include "memory/metaspaceShared.hpp"
33 #include "memory/resourceArea.hpp"
34 #include "runtime/arguments.hpp"
35 #include "utilities/ostream.hpp"
36
37 SharedPathsMiscInfo::SharedPathsMiscInfo() {
38 _buf_size = INITIAL_BUF_SIZE;
39 _cur_ptr = _buf_start = NEW_C_HEAP_ARRAY(char, _buf_size, mtClass);
40 _allocated = true;
41 }
42
43 SharedPathsMiscInfo::~SharedPathsMiscInfo() {
44 if (_allocated) {
45 FREE_C_HEAP_ARRAY(char, _buf_start);
46 }
47 }
48
49 void SharedPathsMiscInfo::add_path(const char* path, int type) {
50 log_info(class, path)("type=%s ", type_name(type));
51 ClassLoader::trace_class_path("add misc shared path ", path);
52 write(path, strlen(path) + 1);
53 write_jint(jint(type));
54 }
|
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "classfile/classLoader.hpp"
27 #include "classfile/classLoaderData.inline.hpp"
28 #include "classfile/sharedPathsMiscInfo.hpp"
29 #include "logging/log.hpp"
30 #include "logging/logStream.hpp"
31 #include "memory/allocation.inline.hpp"
32 #include "memory/metaspaceShared.hpp"
33 #include "memory/resourceArea.hpp"
34 #include "runtime/arguments.hpp"
35 #include "runtime/os.inline.hpp"
36 #include "utilities/ostream.hpp"
37
38 SharedPathsMiscInfo::SharedPathsMiscInfo() {
39 _buf_size = INITIAL_BUF_SIZE;
40 _cur_ptr = _buf_start = NEW_C_HEAP_ARRAY(char, _buf_size, mtClass);
41 _allocated = true;
42 }
43
44 SharedPathsMiscInfo::~SharedPathsMiscInfo() {
45 if (_allocated) {
46 FREE_C_HEAP_ARRAY(char, _buf_start);
47 }
48 }
49
50 void SharedPathsMiscInfo::add_path(const char* path, int type) {
51 log_info(class, path)("type=%s ", type_name(type));
52 ClassLoader::trace_class_path("add misc shared path ", path);
53 write(path, strlen(path) + 1);
54 write_jint(jint(type));
55 }
|