Re: Memory allocation overhead

Lothar Scholz <[email protected]>
Newsgroups gmane.comp.lang.eiffel.gobo.devel
Organization Scriptolutions
Message-ID <[email protected]>
Hello Eric,

Friday, April 4, 2008, 11:55:10 PM, you wrote:

EB> Eric Bezault wrote:
>> Colin Paul Adams wrote:
>>> Do you use free at all? Obviously that won't reduce the number of
>>> allocations, but it will reduce the number of objects the GC has to
>>> deal with. Does it give any advantage over assigning Void to the
>>> reference?
>> 
>> I don't use free.

EB> I just saw that in your last check-in you used MEMORY.free.
EB> This is a bad idea in my opinion. And it won't help anyway
EB> when using gec+boehm (it's currently implemented as a no-op).

Which GC version are you using? GC_free is implemented in "malloc.c"
and it works fine. I used it starting with 6.7 upto the latest
7.1.beta3-snapshot it was never a no-op.

I'm using it a lot to free large buffers and it helps to keep
memory footprint small. Waiting for a 500 KByte memory chunk to
get freed by a conservative GC is just extremely risky.

Remember if you using double and real values you might have a lot
of false positives.


-- 
Best regards,
 Lothar                            mailto:[email protected]


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Register now and save $200. Hurry, offer ends at 11:59 p.m., 
Monday, April 7! Use priority code J8TLD2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.