Re: Memory allocation overhead
Colin Paul Adams <[email protected]>
| Newsgroups | gmane.comp.lang.eiffel.gobo.devel |
|---|---|
| Message-ID | <[email protected]> |
>>>>> "Lothar" == Lothar Scholz <[email protected]> writes: EB> I just saw that in your last check-in you used MEMORY.free. EB> This is a bad idea in my opinion. Why? I was only using it in places where I could guarantee that the object wouldn't be used again (not a frequent case). It can cut down the amount of work needed by the next mark cycle. EB> And it won't help anyway EB> when using gec+boehm (it's currently implemented as a no-op). Lothar> Which GC version are you using? GC_free is implemented in Lothar> "malloc.c" and it works fine. I used it starting with 6.7 Lothar> upto the latest 7.1.beta3-snapshot it was never a no-op. Lothar> I'm using it a lot to free large buffers and it helps to Lothar> keep memory footprint small. Waiting for a 500 KByte Lothar> memory chunk to get freed by a conservative GC is just Lothar> extremely risky. Lothar> Remember if you using double and real values you might Lothar> have a lot of false positives. But Gobo code has to work with ISE as well as GEC. And Manu warned that it might fail with ISE, as the C code might continue to hold a reference to the object. That's why I removed the calls to free. -- Colin Adams Preston Lancashire ------------------------------------------------------------------------- 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