Site Tools
Sidebar
User's Manual
t2:pmem_load
pmem_load
pmem_load - Load persistent memory
Description
void pmem_load();
void pmem_load(uint8 slot_no);
Load the persistent memory contents correlated with the current memory slot, or with slot_no, to a RAM structure, so it can be accessed by pmem_read()
and pmem_write()
.
If used, pmem_load() should be called once at the init section of the script. |
Optional Parameter
- slot_no: A valid memory slot number, between 1 and 9.
Return Value
No value is returned.
Persistent Memory
The persistent memory is an array of 128 bytes that can be used to store data structures such that they can continue to be accessed even after the end of the GPC script that created or last modified them.
For performance reasons the operations pmem_read()
and pmem_write()
are performed in RAM, therefore the persistent memory contents should first be loaded into RAM space by pmem_load()
and, if modified, saved with pmem_save()
.
Examples
Example #1 pmem_load() example
init { pmem_load(); }
See Also
t2/pmem_load.txt · Last modified: 2017/03/20 11:55 by J2Kbr