Memory usage with IPAS..
3 messages in this thread
Jonas,
How's things? Got a quick (maybe quick) question. I have found that with
certain meshes my pxp is paging somewhat. With all the calculations that I
have made, my code could only be generating about 6mb of usage at any given
time and free's up the memory as soon as it is no longer necessary. We have
absolutely proven that fact! Does 3DS allow calls to free to actually free up
the memory at the time of the call or does it only free up after the ipas
'terminates'? On objects that do not page, there is absolutely no memory use
according to Current Status in 3DS, but if it pages at all, it's a lost cause.
Any one know of any Metaware compiler/ PharLap linker settings that could
affect this? Any thing else that I could have missed?
Thanks so much for your time,
doug
Doug,
<< Does 3DS allow calls to free to actually free up the memory at the time of
the call or does it only free up after the ipas 'terminates'? >>
Grant writes:
Every Pharlap program gets its own code segment and data segment. Initially,
unless modified by MAXDATA option, the data segment starts out small. If
malloc tries to allocate memory, and there is none left in the segment, it will
increase the size of the segment with a call to pharlap. When free() is
called, it doesn' t decrease the size of the segment, it only changes the
memory table used by malloc .
The memory is freed up, but only for used by the IPAS routine. Other programs,
l ike 3DS, still can't use the memory.
The only way around this is for someone to write a new malloc/free set of
routine's that tries to decrease the size of the memory segment whenever
possible.
Doug,
<< memory and IPAS3.. >>
In addition to Grants previous thread, his complete thread on this
issue occurred between John Foust and Grant a few weeks back.
You can find this thread in IPAS3Q.zip in "SDK" section of the lib.
jonas[adesk]