Ticket #50686: patch-psutil__psutil_osx.c.diff

File patch-psutil__psutil_osx.c.diff, 949 bytes (added by stromnov (Andrey Stromnov), 9 years ago)

Intel-friendly patch

  • psutil/_psutil_osx.c

    old new  
    600600
    601601    // Roughly based on libtop_update_vm_regions in
    602602    // http://www.opensource.apple.com/source/top/top-100.1.2/libtop.c
    603     for (mach_vm_address_t addr = MACH_VM_MIN_ADDRESS; ; addr += size) {
     603    mach_vm_address_t addr;
     604    for (addr = MACH_VM_MIN_ADDRESS; ; addr += size) {
    604605        vm_region_top_info_data_t info;
    605606        mach_port_t object_name;
    606607
     
    621622        }
    622623
    623624        switch (info.share_mode) {
     625#if !defined(__ppc__) && !defined(__powerpc__) && !defined(__ppc64__) && !defined(__powerpc64__)
    624626            case SM_LARGE_PAGE:
    625627                // NB: Large pages are not shareable and always resident.
     628#endif
    626629            case SM_PRIVATE:
    627630                private_pages += info.private_pages_resident;
    628631                private_pages += info.shared_pages_resident;