Java Memory correctMemoryValue(int memory)

Here you can find the source of correctMemoryValue(int memory)

Description

correct Memory Value

License

Open Source License

Declaration

public static long correctMemoryValue(int memory) 

Method Source Code

//package com.java2s;
/*//from  ww w. j  a va 2s.  co m
 * Copyright (C) 2010-2014 - Andreas Maier 
 * CONRAD is developed as an Open Source project under the GNU General Public License (GPL).
 */

public class Main {
    public static long correctMemoryValue(int memory) {
        long mem = memory;
        if (mem < 0) {
            mem -= Integer.MIN_VALUE;
            mem += Integer.MAX_VALUE;
        }
        return mem;
    }
}

Related

  1. alignMemory(long numBytes)
  2. checkLowMemory()
  3. checkMemory()
  4. checkMinMemory(long min)
  5. compactMemory()
  6. displayMemory(String label, long bytes)
  7. dumpMemory()
  8. dumpMemoryInfo(String msg)
  9. fillMemory()