Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail From: KitKat Newsgroups: comp.lang.java.programmer Subject: Re: Why "lock" functionality is introduced for all the objects? Date: Tue, 05 Jul 2011 15:30:17 -0400 Organization: Nestle Lines: 52 Message-ID: References: NNTP-Posting-Host: 3YDAuD+aHzH3oDO5mYkDPw.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: WinVN 0.99.12z (x86 32bit) X-Notice: Filtered by postfilter v. 0.8.2 Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:5866 On 05/07/2011 3:15 PM, BGB wrote: > On 7/1/2011 3:08 PM, KitKat wrote: >> Regardless of which, "Onodera" also sounds feminine. > > grr... the name is not latin-based, What does Latin have to do with Java, BGB? > not everything that ends in 'a' is female. No, just the names that do. > not like it is some guy with a name like "Chibichibi Hitomi" or > something, which would be a bit suspect. Yes, "i" instead of "y" endings are also usually feminine. > "anata wa des-ka?" > "chibi-chibi hitomi wa deeesuuu!" (meanwhile doing an imbalanced stance). What does your public drunkenness have to do with Java, BGB? > as other people look with a solidly "WTF?" expression upon hearing this. > > another person stands up, puts his hands to his face, and a background > voice exclaims "shaaku!" (IOW: "shock!"). What does your hallucination have to do with Java, BGB? > storing type-IDs as an id-number can also work, then one fetches the > vtable/... via an array index. a downside though is that this would have > a potential performance impact, as additional operations are now needed > to access the vtable. Even the other suggestion involved a shift and mask, as well as a prior bit-test and branch in case of a thick lock in which event the vtable was one more indirection away, though branch prediction would take care of the latter handily for every method invocation not called inside of a critical section. > or, one can reserve a chunk of memory (wherever it is) and subtract out > the address. then one can re-add the relative address to the base address. Doubles heap size, if you're suggesting what it sounds like you're suggesting. > say, a 64-bit base address known to the VM, and only a 32-bit relative > address is stored in the object (possibly shifted right 3 bits with the > top-3 used for the lock). Limits the heap to what the limit would be in a 32-bit VM.