Re: allocate() and free()

new topic     » goto parent     » topic index » view thread      » older message » newer message

R> Ok, I tried it. Thanks for the very clear demo programs.

R> It tells me I have 1953Mb of free "memory"
R> on my 64Mb RAM machine. After the VB program
R> allocates 10Mb it tells me I have 27Mb less "memory".
R> Then when the 10Mb is cleared, it tells me I now have
R> 1966Mb, i.e. 13Mb more than I had at the
R> very beginning.

R> I don't know what the numbers mean.
R> I respectfully suggest that you don't know
R> what the numbers mean either.

1953 MB is 64 MB physical memory and pagefile depending to your
drive free space that contains the pagefile.

If the VB program use 10 MB of memory (not 10 MB of string), the O/S
manages the memory, so unnecessary memory from other program
discarded. so free memory decreased less than 10 MB.

after that 10 MB memory freed, free memory is more than before
because that discarded memory.

R> It's true that the Euphoria program (as I would expect)
R> didn't bounce back to the original level of free "memory",
R> since it is keeping the memory for further use.

R> Maybe there's a special case where VB can return
R> the memory. If it's like other Microsoft Basic's I've studied
R> in the past, it has a separate contiguous area of
R> memory reserved for just strings, and it triggers an
R> expensive garbage collection whenever it happens to
R> run out of string memory. Perhaps it can return to the O/S,
R> or downsize, that particular block if it's at the end of the heap.

R> Anyway, this is just idle speculation.
R> I am content with Euphoria's current way of allocating
R> and deallocating storage, and I have no plans to change it.

R> Regards,
R>    Rob Craig
R>    Rapid Deployment Software
R>    http://www.RapidEuphoria.com

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu