From: John L. <jla...@gm...> - 2006-10-09 15:40:37
|
resend, hopefully sourceforge has stopped blocking email from gmail... sigh. ---------- Forwarded message ---------- From: John Labenski <jla...@gm...> Date: Sep 28, 2006 6:05 PM Subject: Re: [Wxlua-users] Binary MSW snapshot was Re: wxlua 2.6.2 memory leak To: wxl...@li... On 9/27/06, Andre <ar...@ki...> wrote: > > > I tested the new version of wxlua, and it still takes 4kb every 2 seconds, > > > regardless of what I do. No worries though, as I plan on using the real > > > editor from now on :) > > > > Humm... I'll look into this. That does sound like a lot of memory after awhile. > > Just compiled a recent version and I have been monitoring the memory on XP. The > memory usage goes up for a while up to around 14000 K then bounce back to around > 9000 K. This is "normal" because the lua 5.1 garbage collector runs whenever it thinks there's enough memory used. The problem is that lua doesn't know the size of the objects being created so it counts all user data as just void*. At least this is my understanding of the situation. The threshold can be turned down, but there will always be a huge difference between the size of void* and any reasonable class instance so you'd have to basicly have the gc running every cycle to keep up which would slow things down quite a bit. Regards, John Labenski |