On Monday, 12 May 2014 at 21:22:09 UTC, Steven Schveighoffer wrote:
On Mon, 12 May 2014 14:14:28 -0400, Ola Fosheim Grøstad <[email protected]> wrote:

On Monday, 12 May 2014 at 17:52:18 UTC, Walter Bright wrote:
On 5/12/2014 7:46 AM, Steven Schveighoffer wrote:
pointing at it is roughly 1/256. This problem is just about eliminated with
64-bit pointers.

Not generally true. This presumes that the heap is not in the lower region of the address space and that you don't use 64 bit ints on the stack.

I was thinking in terms of purely a random number happening to point at heap data. Practically speaking, I don't know the true likelihood based on the heap address scheme of 64-bit OSes, but

Wicked topic. In AMD64 mode hi-mem is usually reserved for kernel etc. Traditionally the unixy heap grew from low towards high addresses:

http://en.wikipedia.org/wiki/Sbrk

But that is legacy. I think mmap is it… :-P And layout is randomized to reduce the effect of buffer overflow etc.

:-(

I know that we always have a complainer who will try and do an array-append test on 32-bit code, and end up exhausting memory unexpectedly.

Uhuh. Not focusing on precise collection gets ugly.

Reply via email to