3 ms·
That struct on the heap is just consecutive bytes in an array, so you just return an integer.
by kaba0 4y ago
That struct on the heap is just consecutive bytes in an array, so you just return an integer.
- Thiez 4y agowarrenm was asking whether Java's (and implicitly: the JVMs) concept of references could be used. I'm glad that you agree with me that they cannot. Representing the memory of a compiled C program with a giant byte array would of course work, but also defeat the purpose of running on the JVM in the first place. You lose all the advantages that running on the JVM might have given you, and are slower than a natively compiled program.