[Vm-dev] Changes to memory allocation (FIX)

Igor Stasenko siguctua at gmail.com
Tue Jun 7 10:28:08 UTC 2011


On 7 June 2011 01:53, John McIntosh <johnmci at smalltalkconsulting.com> wrote:
>
> (a) I'm wondering how this collides with primitiveSetGCBiasToGrow.
>
the image sets bias to grow flag at startup. so it is not because grow
is disabled.

> (b) I'm sure some windows person said when you set the limit to 1GB
> about 10 million Windows computers flip out and die in some strange
> manner which is why it's the "safe" 512MB.
>
the problem disappears even with 512 Mb.
Since 420Mb < 512Mb :)

>
> On Mon, Jun 6, 2011 at 8:43 AM, Igor Stasenko <siguctua at gmail.com> wrote:
>>
>> Hello, remember the problem Tudor has on Win32.
>> I tracked it down to the #sufficientSpaceAfterGC: method.
>> It looks like it miscalculating the amount of required space , and so the check
>>
>>        self oop: freeStart + minFree + 15000 isLessThan: reserveStart
>>
>> fails after growing the memory.
>> I am not sure how to correctly calculate the amount of required free
>> memory, so i just put it in loop,
>> and grow memory until condition met or no free space available).
>>
>> However, there are still plenty of memory available & address space.
>> In my test VM, i raised the limit up to 1Gb
>> and also modified platform files a little to log the numbers it operating with.
>> Before the change, opening a large image were lead to low-space
>> warning which hangs the image.
>> Now, after change, no low-space warning anymore.
>>
>> So, here the output:
>>
>> max available memory space: 1073741824 , reserved now: 422965248
>> allocated extra memory: 4214784 , total: 427180032
>> allocated extra memory: 4214784 , total: 431394816
>> allocated extra memory: 4214784 , total: 435609600
>> allocated extra memory: 4214784 , total: 439824384
>> sqMemoryExtraBytesLeft returns: 633917440
>> allocated extra memory: 5914624 , total: 445739008
>>
>>
>> Before change it was:
>>
>> max available memory space: 1073741824 , reserved now: 422965248
>> allocated extra memory: 4198400 , total: 427163648
>> allocated extra memory: 4198400 , total: 431362048
>> allocated extra memory: 4198400 , total: 435560448
>> allocated extra memory: 4198400 , total: 439758848
>>
>> The image i tried is one, provided by Tudor (about 412 Mb) - there are
>> link to download somewhere. It shows a low space warning on startup.
>>
>> The are no functional changes in attached sqWin32Alloc.c/.h . I put
>> them here just to show how i got the above numbers output.
>> (except that i raised an address space limit to 1Gb in header).
>>
>> --
>> Best regards,
>> Igor Stasenko AKA sig.
>>
>>
>
>
>
> --
> ===========================================================================
> John M. McIntosh <johnmci at smalltalkconsulting.com>
> Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
> ===========================================================================
>



-- 
Best regards,
Igor Stasenko AKA sig.


More information about the Vm-dev mailing list