Commit 0539f1f7 by Zack Weinberg Committed by Zack Weinberg

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
parent cc2e8b2d
2001-04-27 Zack Weinberg <zackw@stanford.edu>
* 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 <tromey@redhat.com> 2001-04-27 Tom Tromey <tromey@redhat.com>
* jni.cc (_Jv_JNI_GetPrimitiveArrayRegion): Fixed bounds * jni.cc (_Jv_JNI_GetPrimitiveArrayRegion): Fixed bounds
......
...@@ -300,7 +300,7 @@ _Jv_InitThreads (void) ...@@ -300,7 +300,7 @@ _Jv_InitThreads (void)
_Jv_Thread_t * _Jv_Thread_t *
_Jv_ThreadInitData (java::lang::Thread *obj) _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->flags = 0;
data->thread_obj = obj; data->thread_obj = obj;
...@@ -315,7 +315,7 @@ _Jv_ThreadDestroyData (_Jv_Thread_t *data) ...@@ -315,7 +315,7 @@ _Jv_ThreadDestroyData (_Jv_Thread_t *data)
{ {
pthread_mutex_destroy (&data->wait_mutex); pthread_mutex_destroy (&data->wait_mutex);
pthread_cond_destroy (&data->wait_cond); pthread_cond_destroy (&data->wait_cond);
delete data; _Jv_Free ((void *)data);
} }
void void
......
...@@ -609,7 +609,7 @@ _Jv_ThisExecutable (const char *name) ...@@ -609,7 +609,7 @@ _Jv_ThisExecutable (const char *name)
{ {
if (name) if (name)
{ {
_Jv_execName = new char[strlen (name) + 1]; _Jv_execName = (char *) _Jv_Malloc (strlen (name) + 1);
strcpy (_Jv_execName, name); strcpy (_Jv_execName, name);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment