Hello, we all know livecode uses windows paging file (virtual memory) to store the variable data we use in our scripts. the lager the variable data is, the more space in paging file used by livecode. I came to realize that "put empty into variable" does not actually restore the space in vritual memory that been used to store the variable data. So I'm interested to know if its possible to clean the virtual memory and restore the space as well, because my tool sometimes have to handle the process with a variable data in big size.
Any positive reply would be much appreciated
How to clear virtual memory
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 9802
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: How to clear virtual memory
Do we? How are you observing that?alemrantareq wrote:we all know livecode uses windows paging file (virtual memory) to store the variable data we use in our scripts...
Normally VM is managed by the OS rather than an application. How large is your variable that it needs to dip into swap? How much RAM is installed on your system?
As far as general memory usage, if you have, say, 1 MB of data in a variable, and you replace that with 0 bytes (empty), you should see a reduction of memory allocation.
There is some modest overhead in maintaining the variable itself, but it's just a few bytes.
In some cases it may require the engine to get to idle before you'll see recovered memory.
Can you tell us a bit more about what your script is doing, and how you're measuring its RAM use?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn