Re: [BLACKBOX] Illegal Memory Access with Windows 7 - Update

From: [at]} <Chris>
Date: Sat, 17 Aug 2013 13:07:00 +0930

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

> -----Original Message-----
> From: BlackBox [mailto:BLACKBOX{([at]})nowhere.xy
> Skulski
> Sent: Saturday, 17 August 2013 12:20 PM
> To: BLACKBOX{([at]})nowhere.xy
> Subject: Re: [BLACKBOX] Illegal Memory Access with Windows 7 - Update
>
> Chris:
>
> > In a word - fragmentation. There might be more than 250MByte of
> > *total* memory available in the system but not 250Mbyte of

> > *contiguous* memory (as needed by an array) at that time. It depends
> > on how efficiently the garbage collector is cleaning up.
>
> I am not sure why the memory has to be contiguous under kernel that runs
> with virtual memory management? Is it not the task of the virtual memory
> to make physical memory look contiguous no matter what?
>

Virtual memory is managed in pages.

The test program is deliberately designed to stress the system. It is
effectively attempting to allocate arrays which could be as big as:

  ARRAY 536871040 OF BYTE

Moreover it is attempting to store 1024 of these arrays all at the same
time!!!

The virtual memory page file size on Windows systems is typically set at
about 3 x physical memory. Assuming an *average* size of each array of 256Mb
you would need a machine with more than 80Gb of physical RAM if you wanted
to guarantee anywhere near 100% of successful allocations.

The pages required to store each entire array might not need to be
contiguous but the elements of the part of the array that fitted into a page
would need to be.

I could be wrong but my understanding is that the number of *free* pages you
would need to store each of these arrays is:

 ArraySize / pagesize (+1 for any possible remainder)

The partially filled pages could lead to as many as 1024 fragmented pages
additional to what already existed in the system.

Regards,
Chris


----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-589638738_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGZiaWRpcyBcZGVmZjB7XGZvbnR0YmwN
CntcZjBcZnN3aXNzIEFyaWFsO30NCntcZjFcZm1vZGVybiBDb3VyaWVyIE5ldzt9DQp7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2013 - 05:37:00 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:29:50 UTC