Monday, June 30, 2008
Blackberry Curve
I recently purchased a BlackBerry curve, and I have to say I am impressed. As a skeptic migratingn from a Treo 700p, my assumptions about the lack of expandiblity and capabilities of the BlackBerry family of products have been blown away.
I finally have a push email service with gmail (though unfortunatly not with the blackberry gmail client).
The best part - the one day Verizon sale put the Curve in my pocket for $49.95 and dropped my data plan from $44.95 to $29.95 a month.
Friday, June 06, 2008
RAM, RMagick, and You
Two days before the release, I am looking at top and trying to figure out why my mongrel instances are growing wildly in RAM. Playing with
After isolating the problem to something having to do with ImageMagick I discover what appears to be the problem. RMagick is not releasing the memory allocated with
Apparently what happens is RMagick holds a little tiny reference to some great big chunk of ImageMagick's memory. Well the GC only recognizes a the reference (which is very small).
Then I saw this very valuable post on RMagick
Turns out they have 'fixed' this by providing you the method
GC.start
makes things a little better, but I just have some itch in me that tells me that might not be the best thing in the world to do. After isolating the problem to something having to do with ImageMagick I discover what appears to be the problem. RMagick is not releasing the memory allocated with
RMagick::ImageList.new
.Apparently what happens is RMagick holds a little tiny reference to some great big chunk of ImageMagick's memory. Well the GC only recognizes a the reference (which is very small).
Then I saw this very valuable post on RMagick
Turns out they have 'fixed' this by providing you the method
.destroy!
. That did the trick and life is back to mostly normal. Just thought I'd write this up quickly as memory leaks are not fun to find, especially in ruby.
Labels:
garbage collector,
GC,
GC.start,
imagemagick,
memory leak,
rails,
rmagick,
ruby
Subscribe to:
Posts (Atom)