Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

On my Mac Os 10.5.8 Server, Java is reserving 16,777,216TB (about a third more then the sum of all human knowledge -eek!) of virtual memory. I know it's not really reserving this (it would be pretty amazing if it was!); is it something to worry about (i.e. a bug / glitch), and if not, what does it mean?

enter image description here

share|improve this question
3  
Awesome analogy! That's a whole lot of terabytes. –  bmike Jul 11 '11 at 4:21
add comment

1 Answer 1

up vote 1 down vote accepted

16 Mebi TebiBytes (16 ExbiBytes) is 2^64 Bytes. Your machine must be using 64-bit addressing, and your JVM (Java Virtual Machine) probably wrote something to address 0xffffffffffffffff within its own virtual address space (possibly by accidentally writing to the address that's one less than 0x0000000000000000), causing the Mac OS X kernel's virtual memory subsystem to consider that process to be using that process's entire virtual address space.

Don't worry, virtual memory is sparse. That is, it doesn't allocate memory pages (or swap space on disk) for every mapped address, just for the memory pages your process has actually written to. But I guess that's obvious already unless you happen to have a 16+ ExbiByte RAID mounted at / or at /var/vm/ where your virtual memory swapfiles are located. :-)

Seeing a process cause its entire virtual 64-bit address space to become mapped is an oddity, but shouldn't cause any problems.

share|improve this answer
    
Great answer, thankyou. –  glenstorey Jul 13 '11 at 20:15
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.