raidho36 wrote: ↑Sat Mar 10, 2018 9:43 pm
Why doesn't it makes sense? You create text so some memory has to be allocated. If it can't be allocated, the game will crash.
Ok, i can't say something against this .
But it crashes at 1.2 gig. What pgimeno says. Or i'm wrong!? I've 16 gig and 5 gig free and 11 gig available.
Maybe windows 7 - 64 bit has some barrier for 32 bit applications :-/ ?
pgimeno wrote: ↑Sat Mar 10, 2018 10:10 pm
Yeah, 32 bit applications can't address more than 31 bits. Linux has a limit of 1.5 Gb, maybe Windows actually has a limit under 2 Gb too.
As for the line, that's probably where the main thread is when one of the threads causes the crash.
Thx for the explanation.
Hm.. the bad alloc I understand, but as love runs in sandbox lua vm...love shouldn't crash that hard. There should be a normal abort or normal error message and not a crash.
Out of memory errors usually just hard crash the system. Nothing you can do about them anyway, other than say "your system doesn't have enough memory".
It crashes at 1.2 gigs because that's the maximum continuous memory chunk length on your system. It wouldn't be an issue if your memory was used across multiple objects, but it's all in a single Channel.
Ok, it's a bad allocation in love 011, but in love 102 it's c++ library runtime error.
But now i want to know what i'm doing wrong. I just pass one variable from thread to mainthread. I'm not increasing an array of something.
So what is the right handling with threads? Build a thread calculate something and than delete the thread and create a new one!?
I mean, holding a thread and passing more stuff is usual. How can I limit this increase? I've no way todo it. Just doing it slower is no solution. The memory increases over time. The memory must be acclocated by the c part of love and I cannot control this. Maybe there is a problem in push and pop, not freeing memory!?
Last edited by SiENcE on Sat Mar 10, 2018 10:30 pm, edited 1 time in total.
You push it at a rate of several million per second, and draw at a rate of just several per second. You need to draw them million times faster or feed million times slower.
I always though love does this abstraction for me.
Anyway, understood now. Thanks very much!
But what is the best way to detect this rates? At which rate update is called?
:update is called at a frequence of ~ 0.015. The thread must push a bit slower. So I have to get update DT to the thread to calculate the correct frequency.
As additional check I can use channel:getCount() to determin the number of waiting messages. If messages are increasing i apply
channel:clear().
All correct?
Last edited by SiENcE on Sat Mar 10, 2018 10:58 pm, edited 1 time in total.