From 0539f1f7097a59a1bf61108e306184c2614d15c1 Mon Sep 17 00:00:00 2001 From: Zack Weinberg Date: Sat, 28 Apr 2001 00:04:55 +0000 Subject: [PATCH] prims.cc (_Jv_ThisExecutable): Use _Jv_Malloc. * prims.cc (_Jv_ThisExecutable): Use _Jv_Malloc. * posix-threads.cc (_Jv_ThreadInitData): Use _Jv_Malloc. (_Jv_ThreadDestroyData): Use _Jv_Free. From-SVN: r41650 --- libjava/ChangeLog | 6 ++++++ libjava/posix-threads.cc | 4 ++-- libjava/prims.cc | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 74523a6722c..8c1affd26bf 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,9 @@ +2001-04-27 Zack Weinberg + + * prims.cc (_Jv_ThisExecutable): Use _Jv_Malloc. + * posix-threads.cc (_Jv_ThreadInitData): Use _Jv_Malloc. + (_Jv_ThreadDestroyData): Use _Jv_Free. + 2001-04-27 Tom Tromey * jni.cc (_Jv_JNI_GetPrimitiveArrayRegion): Fixed bounds diff --git a/libjava/posix-threads.cc b/libjava/posix-threads.cc index ce70257673d..6cbd29798f9 100644 --- a/libjava/posix-threads.cc +++ b/libjava/posix-threads.cc @@ -300,7 +300,7 @@ _Jv_InitThreads (void) _Jv_Thread_t * _Jv_ThreadInitData (java::lang::Thread *obj) { - _Jv_Thread_t *data = new _Jv_Thread_t; + _Jv_Thread_t *data = (_Jv_Thread_t *) _Jv_Malloc (sizeof (_Jv_Thread_t)); data->flags = 0; data->thread_obj = obj; @@ -315,7 +315,7 @@ _Jv_ThreadDestroyData (_Jv_Thread_t *data) { pthread_mutex_destroy (&data->wait_mutex); pthread_cond_destroy (&data->wait_cond); - delete data; + _Jv_Free ((void *)data); } void diff --git a/libjava/prims.cc b/libjava/prims.cc index 9455b7551a2..0fa42a4d6a8 100644 --- a/libjava/prims.cc +++ b/libjava/prims.cc @@ -609,7 +609,7 @@ _Jv_ThisExecutable (const char *name) { if (name) { - _Jv_execName = new char[strlen (name) + 1]; + _Jv_execName = (char *) _Jv_Malloc (strlen (name) + 1); strcpy (_Jv_execName, name); } } -- 2.30.2