Re: [HACKERS] Question regarding pfree and thread safety.

2004-01-16 Thread Thomas Hallgren
Ok, That was what I suspected, but I was not 100% sure that it applied to the memory allocation routines. It has not escaped me that most things in the backend are indeed intended for single-threading. I'm unaware of any way of coercing the Java runtime into single threading. Instead, I took advan

Re: [HACKERS] Question regarding pfree and thread safety.

2004-01-16 Thread Tom Lane
"Thomas Hallgren" <[EMAIL PROTECTED]> writes: > Is it safe to call pfree() from multiple threads? There are no multiple threads in the backend, and no provision whatever for thread safety. On anything, not only pfree. If your Java runtime cannot be coerced into a single-thread mode of operation,

[HACKERS] Question regarding pfree and thread safety.

2004-01-16 Thread Thomas Hallgren
Is it safe to call pfree() from multiple threads? My Java backend will need to utilize finalizers. Objects like a saved execution plan that has been "forgotten" must be released when the wrapping Java object is finalized to avoid memory leaks. The finalizer is called from the garbage collector whi