Memory allocation: Difference between revisions

m
No edit summary
Line 919:
 
=={{header|Nanoquery}}==
Even though the Nanoquery interpreter is implemented in Java, it is possible to use the native library to directly allocate and access memory located off the heap. In this example, 26 bytes are allocated, filled with the uppercase alphabet, then output to the console. Even though this code is running in the JVM, the allocated memory must still be freed at the end or a leak would occur.
<lang nanoquery>import native
 
Anonymous user