Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How does Euphoria manage memory?

euphoria manage memory
0
Posted

How does Euphoria manage memory?

0

In a transparent way, using copy-on-write to manage private variables. This is good if you do not wish to delve into this black art. Euphoria has the following low level routines in order to manage memory by yourself: • peek(address): retrieve the byte at this address • peek({address,length}): retrieve length bytes starting at address, and returns the sequence made of these bytes. • peek4s: same as above, with signed dwords instead of bytes. Signed dwords may overflow a variable of the integer type; use atoms instead. • peek4u: same as above, but returns unsigned dwords instead. • poke(address,value): sets the byte at address to value. If value is a sequence, the bytes it holds are written in memory starting at address. • poke4: same as above, but the values are dwords instead of bytes. • allocate(size): allocates a memory block size byte long and returns its address as an atom. You have no control over the way the address is generated. • allocate_string(someString): allocates storage

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123