Tag Info

New answers tagged

2

If you want to program a cheap (32 bits) ARM chip in Java (which is probably not a good idea) and if you accept to code against an old version of the Java programming language, you might consider using gcj, the Java ahead-of-time compiler inside some versions of GCC. (Beware, Java support in GCC seems phased out in 2015, or at least is becoming less ...


4

sun.misc.Unsafe isn't part of the Java standard. Thus, your very first task will be determining whether the Java implementation you will be running on the ARM chip supports it. If the answer to the above is yes, you have to ask yourself whether the I/O addresses you need to access are mapped within the JVM process. Unsafe lets you escape the usual Java ...


1

In the majority of cases, you should prefer to actually return things from functions. Passing in a non-const reference to hold the state of your value is typically referred to as an out parameter, or an in-out parameter if you are both using its existing state, and then modifying it. There are a couple of disadvantages of non-const reference parameters: 1) ...


3

Unsurprisingly, this depends on the purpose of the function and the nature of the type it's retrieving/extracting. But it's usually easy to make a choice based on the properties of the type. 1) The value is a primitive such as int or char Then the choice is effectively between: int x = getInt(); and int x; setInt(x); I would strongly prefer returning ...


3

No, you can never exceed 4GiB of simultaneously addressable memory for a 32-bit binary. Usually, the kernel takes half and you are left with 2GiB user. Some kernels support a compromise split of 1GiB/3GiB. However, you can ask the OS to map different portions of a file into memory at different times, essentially performing time multiplexing of the available ...



Top 50 recent answers are included