Re: allocate() and free()
- Posted by Robert Craig <rds at RAPIDEUPHORIA.COM> Dec 02, 2000
- 516 views
Aku writes: > If you don't trust me, you can try yourself. Ok, I tried it. Thanks for the very clear demo programs. It tells me I have 1953Mb of free "memory" on my 64Mb RAM machine. After the VB program allocates 10Mb it tells me I have 27Mb less "memory". Then when the 10Mb is cleared, it tells me I now have 1966Mb, i.e. 13Mb more than I had at the very beginning. I don't know what the numbers mean. I respectfully suggest that you don't know what the numbers mean either. It's true that the Euphoria program (as I would expect) didn't bounce back to the original level of free "memory", since it is keeping the memory for further use. Maybe there's a special case where VB can return the memory. If it's like other Microsoft Basic's I've studied in the past, it has a separate contiguous area of memory reserved for just strings, and it triggers an expensive garbage collection whenever it happens to run out of string memory. Perhaps it can return to the O/S, or downsize, that particular block if it's at the end of the heap. Anyway, this is just idle speculation. I am content with Euphoria's current way of allocating and deallocating storage, and I have no plans to change it. Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com