VirtualBox

Changeset 45099 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Mar 20, 2013 8:27:15 AM (12 years ago)
Author:
vboxsync
Message:

Runtime: fixed RTSystemQueryTotalRam() and RTSystemQueryAvailableRam() on 32-bit hosts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/linux/systemmem-linux.cpp

    r43548 r45099  
    5151    if (rc == 0)
    5252    {
    53         *pcb = (uint64_t)(info.totalram * (unsigned long)info.mem_unit);
     53        *pcb = (uint64_t)info.totalram * info.mem_unit;
    5454        return VINF_SUCCESS;
    5555    }
     
    6868        /* XXX Actually this is not quite correct. We would also need to add the cached
    6969         *     RAM but this information is not available in sysinfo. */
    70         *pcb = (uint64_t)((info.freeram + info.bufferram) * (unsigned long)info.mem_unit);
     70        *pcb = ((uint64_t)info.freeram + info.bufferram) * info.mem_unit;
    7171        return VINF_SUCCESS;
    7272    }
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette