Re: JavaMemoryModel: Another software-only solution

From: Bill Pugh (pugh@cs.umd.edu)
Date: Fri Jul 02 1999 - 10:11:31 EDT


At 6:24 PM -0400 7/1/99, Ole Agesen - SunLabs wrote:
>I'd like to throw in a caution here. The nursery or youngest
>generation (or whatever you call it) is the high pressure end
>of the memory system. Any overhead introduced there, will make
>itself visible! In the above case, the overhead is on every allocated
>object, not just on every object that survives a collection.

I'm not thrilled by any of these solutions, but we need to have
something, or else be convinced that there is no good software only
solution.

In some cases, analysis might allow you to eliminate the padding. If
you can tell that between the allocations/initialization of obj1 and
obj2, obj1 will not be published (a reference made available to
another thread), then you can put them on the same cache line. If an
object won't escape the thread at all, you don't need to worry about
padding at all.

        Bill Pugh

-------------------------------
This is the JavaMemoryModel mailing list, managed by Majordomo 1.94.4.

To send a message to the list, email JavaMemoryModel@cs.umd.edu
To send a request to the list, email majordomo@cs.umd.edu and put
your request in the body of the message (use the request "help" for help).
For more information, visit http://www.cs.umd.edu/~pugh/java/memoryModel



This archive was generated by hypermail 2b29 : Thu Oct 13 2005 - 07:00:14 EDT