Get size of memory on C{node}.

    @param node: node idx
    @type node: C{int}
    @return: free memory/total memory
    @rtype: C{tuple}(C{int}, C{int})
439481
def get_node_size(node):
    

    free = c_longlong()

    if node < 0 or node > get_max_node():
        raise ValueError(node)

    size = libnuma.numa_node_size64(node, byref(free))

    return (free.value, size)
281681
public int freeMemory() {
        int size = 0;
        for (int m = 0; m < memory.length; m++) {
            size += memory[m].length;
            memory[m] = null;
        }
        memory = null;
        return size;
    }
1362264
public int size()
    {
        int size = 0;
        if (value != null)
            size++;
        for (Trie<K, V> child : children.values())
            size += child.size();
        return size;
    }
414613
private static long getSizeOfFreeMemory() {
		float fractionToUse = GlobalConfiguration.getFloat(
			ConfigConstants.TASK_MANAGER_MEMORY_FRACTION_KEY, ConfigConstants.DEFAULT_MEMORY_MANAGER_MEMORY_FRACTION);
		
		Runtime r = Runtime.getRuntime();
		long max = r.maxMemory();
		long total = r.totalMemory();
		long free = r.freeMemory();
		
		long available = max - total + free;
		return (long) (fractionToUse * available);
	}
96173
def get_memory(self, start, size):
        
        LOG.debug('get_memory: %d bytes from %x', size, start)
        return get_memory(self.ida.idaapi, start, size,
                          default_byte=self.default_byte)
59504
def get_memory_expr(self, address, size, mode="post"):
        
        mem = self.get_memory(mode)

        return smtfunction.concat(8, *reversed([mem[address + i] for i in range(size)]))
390491
def infer_len(node, context=None):
    
    call = arguments.CallSite.from_call(node)
    if call.keyword_arguments:
        raise UseInferenceDefault("TypeError: len() must take no keyword arguments")
    if len(call.positional_arguments) != 1:
        raise UseInferenceDefault(
            "TypeError: len() must take exactly one argument "
            "({len}) given".format(len=len(call.positional_arguments))
        )
    [argument_node] = call.positional_arguments
    try:
        return nodes.Const(helpers.object_len(argument_node, context=context))
    except (AstroidTypeError, InferenceError) as exc:
        raise UseInferenceDefault(str(exc)) from exc
256523
public int getWidth(ViewNode node) {
		int width = node.getDepth();
		ViewNode children[] = node.findChildren();
		for (int i = 0; i < children.length; i++) {
			int current = getWidth(children[i]);
			if (current > width)
				width = current;
		}
		return (width);
	}
112569
def get_node(self, name, memory=False, binary=False):
        
        return self._api_get(
            url='/api/nodes/{0}'.format(name),
            params=dict(
                binary=binary,
                memory=memory,
            ),
        )
150134
private String getNodeValue(Node node) {
        if (node.getNodeType() == Node.ELEMENT_NODE && node.getFirstChild() != null) {
            return node.getFirstChild().getNodeValue();
        } else {
            return node.getNodeValue();
        }
    }
1112169
private long getMemoryUsage() {
    long totalPageSize = 0;
    for (MemoryBlock page : allocatedPages) {
      totalPageSize += page.size();
    }
    return ((inMemSorter == null) ? 0 : inMemSorter.getMemoryUsage()) + totalPageSize;
  }
85825
def node_to_cpus(node):
    

    result = set()

    if node < 0 or node > get_max_node():
        raise ValueError(node)

    mask = bitmask_t()
    mask.maskp = (c_ulong * (NUMA_NUM_NODES/(sizeof(c_ulong)*8)))()
    mask.size = NUMA_NUM_NODES

    if libnuma.numa_node_to_cpus(node, byref(mask)) < 0:
        raise RuntimeError(node)

    for i in range(0, NUMA_NUM_NODES / (sizeof(c_ulong) *8)):
        for j in range(0, sizeof(c_ulong) * 8):
            if mask.maskp[i] & (1 << j) == (1 << j):
                result.add(i * sizeof(c_ulong) * 8 + j)

    return result
113820
function NodeInfo() {

    /**
     * the CPU model
     * 
     * @type {String}
     */
    this.model = null;

    /**
     * memory size in kilobytes
     * @type {Number}
     */
    this.memory = 0;

    /**
     * the number of active CPUs
     * @type {Number}
     */
    this.cpus = 0;

    /**
     * expected CPU frequency
     * @type {Number}
     */
    this.mhz = 0;

    /**
     * the number of NUMA cell, 1 for unusual NUMA topologies or uniform memory
     * access; check capabilities XML for the actual NUMA topology
     * @type {Number}
     */
    this.nodes = 0;

    /**
     * number of CPU sockets per node if nodes > 1, 1 in case of unusual NUMA
     * topology
     * @type {Number}
     */
    this.sockets = 0;

    /**
     * number of cores per socket, total number of processors in case of
     * unusual NUMA topolog
     * @type {Number}
     */
    this.cores = 0;

    /**
     * number of threads per core, 1 in case of unusual numa topology
     * @type {Number}
     */
    this.threads = 0;

}
1231035
private static Long getContentSize(final Node ds) {
        try {
            long size = 0L;
            if (ds.hasNode(JCR_CONTENT)) {
                final Node contentNode = ds.getNode(JCR_CONTENT);

                if (contentNode.hasProperty(JCR_DATA)) {
                    size =
                            ds.getNode(JCR_CONTENT).getProperty(JCR_DATA)
                                    .getBinary().getSize();
                }
            }

            return size;

        } catch (final RepositoryException e) {
            throw new RepositoryRuntimeException(e);
        }
    }
985716
public long getSize() {
        long elementSize = dumpClass.getHprof().getValueSize(getType());

        return dumpClass.classDumpSegment.getMinimumInstanceSize() + HPROF_ARRAY_OVERHEAD + (elementSize * getLength());
    }
672
def get_size(objects):
    """"""
    res = 0
    for o in objects:
        try:
            res += _getsizeof(o)
        except AttributeError:
            print("IGNORING: type=%s; o=%s" % (str(type(o)), str(o)))
    return res
578579
@SuppressWarnings("PMD.UnusedLocalVariable")
  public static <T> int size(Iterable<T> iter) {
    if (iter instanceof ArrayTagSet) {
      return ((ArrayTagSet) iter).size();
    } else if (iter instanceof Collection<?>) {
      return ((Collection<?>) iter).size();
    } else {
      int size = 0;
      for (T v : iter) {
        ++size;
      }
      return size;
    }
  }