• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Object references on 64 bit machine

 
Ranch Hand
Posts: 2596
Android Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We have Java 5 on our 64 bit machine and the memory consumption of OR mapping objects is significantly (40%-50%) larger on 64 bit machine as compared to 32 bitmachine. I was wondering if anybody knows if JVM implementaion for 64 bit machine uses long instead of int for object references? Or any other reason?

Any inputs, insight would be great!!

TIA,
- Manish
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
All 64-bit programs use more memory than their 32-bit counterparts, for exactly the obvious reasons: pointers are 64-bit. This definitely applies to 64-bit JVMs. For other non-Java programs, the space increase can include "int" being a 64-bit type, but in Java, the various primitives should stay the same size.
 
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It may also align variables on multiples of 64 bits instead of multiples of 32 bits. That adds 4 bytes of unused slack to a 4-byte variable. I used to see this in mainframe assembler, but haven't studied machine code on other machines, so I can't say if it really happens.
[ September 22, 2005: Message edited by: Stan James ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic