Slashdot Mirror


Effect of Using 64-bit Pointers?

An anonymous reader queries: "Most 64-bit processors provide a 32-bit mode for compatibility, but 64-bit pointers are becoming essential as systems move beyond 4GB of RAM. Also, the large virtual address space is very useful for several reasons - allowing large files to be memory-mapped, and allowing pages of memory to be remapped without ever requiring the virtual address space to be defragmented. However, 64-bit pointers take up twice as much memory, which immediately affects memory footprint. This is especially an issue on embedded platforms where RAM is at a premium, but even on systems where RAM is plentiful and cheap the extra memory footprint reduces cache performance. Have Slashdot readers done any research into the actual effect of using 64-bit pointers in a 'typical' application? What proportion of a real program's data is actually pointers?"

5 of 164 comments (clear)

  1. Don't use 64-bit pointers on such systems. by Green+Light · · Score: 5, Insightful
    However, 64-bit pointers take up twice as much memory, which immediately affects memory footprint. This is especially an issue on embedded platforms where RAM is at a premium

    Huh? On systems where RAM is at a premium, I don't see the point of using or having 64-bit pointers.
    --
    "Send an Instant Karma to me" - Yes
  2. Re:easy... by gl4ss · · Score: 5, Insightful

    every object(which is everything apart from your basic int & etc) is a reference, which pretty much is a pointer with a fancy name. as to handling 4gbytes I really don't see why it couldn't, it's just a matter of the vm supporting it anyways(afaik the design, nor the bytecode, limits it).

    however, can you think of any system where you had objects, sets of data, and they weren't (at least underneath) pointers to memory?

    and as to the original subject one poster already said it best: if you really have the need for that extra effort of going 64bit pointers you will probably have the memory to spare, no? anyways it will only be a problem if if the the pointers are big enough in comparision to what they're pointing to.. in which case you should rethink what you're doing anyways probably if you care a squat about memory footprint.. bringing the embedded devices to the discussion at this point is totally pointless but of course cool sounding and slashdot editor catchy.

    bleh I'm no expert anyways.

    --
    world was created 5 seconds before this post as it is.
  3. Re:Embedded platforms?!? by MerlynEmrys67 · · Score: 5, Insightful
    Worked on a Xeon based embedded platform that could have 16 GB of Ram on the system board... You forgot that Intel provides a segmented architecture didn't you ?

    By the way, the limit was from physical slots - 8 and a 2GByte DIMM memory limit, increase either of those and guess what.

    Now each "process" on our box could only address 4 Gbyte of that memory, but that was a completely different question (and in fact limited by the libraries that were used - again a different story)

    I remember these conversations when the 32 bit world came around - what do you mean I have to put 4 bytes into the processor. End result is that the code is a little larger, and a little slower - and Moore's law marches on and we don't even notice

    --
    I have mod points and I am not afraid to use them
  4. Re:Embedded 64-Bit by PenguinOpus · · Score: 5, Insightful

    You missed a good point in the original question. Even if you have tons of RAM, cache size is not growing as quickly and you will thrash your data cache far more quickly if all your pointers double in size. I don't know if immediate mode addressing instructions are common for 64bit operands but if they are, it could thrash your icache sooner as well.

    Bandwidth from memory to cache will also be used by these larger pointers.

    OTOH, other than disk controller caches (?), what kind of embedded systems need more than 4GB online simultaneously ?

  5. Re:easy... by Waffle+Iron · · Score: 5, Insightful
    oh... i use java.

    If you'd pay proper attention to Sun's marketing machine, you'd remember that Java uses a just-in-time compiler. What does a compiler do? It turns all of your "object-oriented is the only valid programming paradigm" source code into a big bucket of CPU-specific opcodes, numbers and *pointers*.

    In fact, it will probably have more pointers than the corresponding C or C++ program would have, due to the plethora of tiny objects you're encouraged to spawn. Naturally, the pointer size would match the CPU architecture on which the program is being run and would consume a corresponding number of cache bytes.