Reading and writing to the SRAM?

Hello im going to build a virtuel machine on the arduino and i need to be able to store temporary data in the ram. I haven't found anyway of doing it so far, but i hope you can help!

There are three kinds of memory on the Arduino. Flash, where the code goes, is read-only. You can't write there.

SRAM, where arrays and other variables go, is read-write, but not persistent. Reading happens when the variable occurs on the right of an equal sign. Writing occurs when it is on the left. That is, no special action is required to read and write to SRAM.

Finally, there is EEPROM where you can explicitly store data that is to be persisted.

Persistent means that the data will survive a power loss/reset.

What, specifically, do you need to do?

i know what all the memory storage units are used for and i know that the non-volatile are slow to use and have a maximum uses. I need to store temporary memory just as the AVR does but with more controll, wich makes it possible to read a variable in a different way(new primitives).

You’re not being very clear.
If you want some RAM, just statically declare an array, or malloc a block once in setup.
It is a fairly precious resource, so go easy.

AWOL: You're not being very clear. If you want some RAM, just statically declare an array, or malloc a block once in setup. It is a fairly precious resource, so go easy.

if i use malloc, will i just be able to use a pointer to directly write to an RAM address?

Yes

AWOL: Yes

well thanks, i've programmed in java for 4 years so i got kinda used to not being able to acces memory from a direct address :P

i've programmed in java

Don't worry, you can still be helped overcome the trauma.

AWOL:

i've programmed in java

Don't worry, you can still be helped overcome the trauma.

oh btw did i mention that the virtuel machine im programming is a JVM?