if USE_CODE_SPACE is true, those space usage should be counted.
===============
  public int getPagesUsed() {

    return loSpace.reservedPages() + immortalSpace.reservedPages() + metaDataSpace.reservedPages() + nonMovingSpace.reservedPages();
  }
=====================
[Full heap]Collection 55:        reserved = GenMW pages used
62 MB (GenMW pages used
16111 pgs)      total = 244 MB (62464 pgs)
  Before Collection: used = 56.12 Mb = nursery2 19.34 Mb + mw 29.00 Mb + boot 0.00 Mb + immortal 0.00 Mb + meta 0.01 Mb + los 3.42 Mb + sanity 0.00 Mb + non-moving 2.47 Mb + sm-code 1.80 Mb + lg-code 0.05 Mb
                     used = 14367 pgs = nursery2 4952 pgs + mw 7424 pgs + boot 0 pgs + immortal 0 pgs + meta 4 pgs + los 878 pgs + sanity 0 pgs + non-moving 634 pgs + sm-code 461 pgs + lg-code 14 pgs
Key: (I)mmortal (N)onmoving (D)iscontiguous (E)xtent (F)raction
     HEAP_START 0x60000000
AVAILABLE_START 0x68000000
   nursery2     0xa5400000->0xafffffff F 0.15
         mw   D [0x73400000->0x737fffff, 0x72c00000->0x72ffffff, 0x72800000->0x72bfffff, 0x72400000->0x727fffff, 0x71c00000->0x71ffffff, 0x71800000->0x71bfffff, 0x71400000->0x717fffff, 0x71000000->0x713fffff]
       boot IN  0x60000000->0x6fffffff E 0x10000000
   immortal IND []
       meta  ND [0x70400000->0x707fffff]
        los  ND [0x73000000->0x733fffff, 0x70c00000->0x70ffffff]
     sanity  ND []
 non-moving  ND [0x70000000->0x703fffff]
    sm-code  ND [0x70800000->0x70bfffff]
    lg-code  ND [0x72000000->0x723fffff]
  AVAILABLE_END 0xb0000000
       HEAP_END 0xb0000000


 
DaFENG
Coder
Telecommunication && Network Industry
Pudong
Shanghai
China