Re: [BLACKBOX] More memory management problems

From: [at]} <Georgy>
Date: Tue, 28 Jun 2011 20:12:55 +0200

----boundary-LibPST-iamunique-1602729120_-_-
Content-type: text/plain

Did you try to change
a : ARRAY n OF INTEGER
to dynamic array
a: POINTER TO ARRAY OF INTEGER?

Georgy

On Tue, Jun 28, 2011 at 5:36 PM, Wojtek Skulski
<skulski{([at]})nowhere.xy
> I am not a Windows programmer (other than BlackBox, of course), so I do
> not know whether the following thought is relevant. Think of "memory
> fragmentation". It may be so that BlackBox is requestion a large
> continuous memory chunk from the operating system. In case such a chunk is
> not available, the allocation request will fail despite plenty of memory
> being around.
>
> This is certainly an issue on MMU-less embedded systems, like the ones I
> am currently developing. It should not be an issue under the virtual
> memory hardware, which supposedly can join together disjoint blocks of
> physical memory. Windows presumably is a virtual memory system, so the
> memory fragmentation should not happen. So the trail may not be relevant.
> But maybe it is relevant? Here my expertise stops.
>
> I think that further progress will require (a) an expert opinion; (b)
> running BlackBox under Windows debugger and examining internal variables;
> or (c) instrumention BlackBox with traps and let the built-in Trap viewer
> tell you what is going on.
>
> W.
>
>> As as second thought, I think that Wojtek's explanation does not apply.
>> Consider the following experiment.
>>
>> start Windows XP, start Task manager:
>>
>>   physical memory: total 3145196 K, available 2725404 K
>> Run BlackBox:
>>
>>   physical memory available 2720632 K, BlackBox memory usage 7604 K
>> Compile "PrivLarge" module:
>>
>>   physical memory available 2721464 K, BlackBox memory usage 8076 K
>>
>> Run "Do" procedure first time:
>>
>>   physical memory available 2487748 K, BlackBox memory usage 242920 K
>>
>> Run "Do" procedure second time:
>>
>>   physical memory available 2487748 K, BlackBox memory usage 242920 K (no
>> change)
>>
>> Run "Do" procedure third time:
>>
>>   physical memory available 2491160 K, BlackBox memory usage 242916 K (4 K
>> less)
>>
>> Compile "PrivLarge" again and unload it:
>>
>>   physical memory available 2726200 K, BlackBox memory usage 8540 K
>>   BlackBox released 240 MB after unloading the module.
>>
>> Try to run "Do" procedure results in "not enough memory":
>>
>>   physical memory available 2726472 K, BlackBox memory usage 8540 K (no
>> change)
>>
>> This shows that unloading actually removes the module from memory,
>>
>> leaving BlackBox with only 8.5 MB occupied.
>>
>> But after that, there is plenty of available memory (far more than "2
>> GB/process" limit),
>>
>> but BlackBox thinks there is "not enough memory" to run a 240 MB module.
>>
>> Looks like BlackBox has a limit on allocating more than ~300 MB since the
>> startup,
>>
>> REGARDLESS of memory being released in between.
>>
>> Sinisa
>
>
> ----
> To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy
>


----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-1602729120_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzc1xmY2hhcnNldDAgQXJpYWw7fQ0Ke1xmMVxmbW9kZXJuIENvdXJpZXIgTmV3O30NCntcZjJc
Zm5pbFxmY2hhcnNldDIgU3ltYm9sO30NCntcZjNcZm1vZGVyblxmY2hhcnNldDAgQ291cmllciBO
ZXc7fX0NCntcY29sb3J0YmxccmVkMFxncmVlbjBcYmx1ZTA7XHJlZDBcZ3JlZW4wXGJsdWUyNTU7
fQ0KXHVjMVxwYXJkXHBsYWluXGRlZnRhYjM2MCBcZjBcZnMyMCBEaWQgeW91IHRyeSB0byBjaGFu
Z2VccGFyDQphIDogQVJSQVkgbiBPRiBJTlRFR0VSXHBhcg0KdG8gZHluYW1pYyBhcnJheVxwYXIN
CmE6IFBPSU5URVIgVE8gQVJSQVkgT0YgSU5URUdFUj9ccGFyDQpccGFyDQpHZW9yZ3lccGFyDQpc
cGFyDQpPbiBUdWUsIEp1biAyOCwgMjAxMSBhdCA1OjM2IFBNLCBXb2p0ZWsgU2t1bHNraVxwYXIN
Cjxza3Vsc2tpQHBhcy5yb2NoZXN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