Re: Beginner memory question.

2022-04-19 Thread H. S. Teoh via Digitalmars-d-learn
On Tue, Apr 19, 2022 at 05:01:15PM +, Era Scarecrow via Digitalmars-d-learn wrote: [...] > In linux using zram i've allocated and made a compressed drive of 8Gb > which took only 200k of space [...] All unallocated pages are assumed > null/zero filled, and if you zeroize a block it will unallo

Re: Beginner memory question.

2022-04-19 Thread Era Scarecrow via Digitalmars-d-learn
On Saturday, 16 April 2022 at 20:48:15 UTC, Adam Ruppe wrote: On Saturday, 16 April 2022 at 20:41:25 UTC, WhatMeWorry wrote: Is virtual memory entering into the equation? Probably. Memory allocated doesn't physically exist until written to a lot of the time. This might be very much an OS im

Re: Beginner memory question.

2022-04-19 Thread H. S. Teoh via Digitalmars-d-learn
On Tue, Apr 19, 2022 at 12:54:06PM +, bauss via Digitalmars-d-learn wrote: > On Saturday, 16 April 2022 at 20:48:15 UTC, Adam Ruppe wrote: > > On Saturday, 16 April 2022 at 20:41:25 UTC, WhatMeWorry wrote: > > > Is virtual memory entering into the equation? > > > > Probably. Memory allocated d

Re: Beginner memory question.

2022-04-19 Thread bauss via Digitalmars-d-learn
On Saturday, 16 April 2022 at 20:48:15 UTC, Adam Ruppe wrote: On Saturday, 16 April 2022 at 20:41:25 UTC, WhatMeWorry wrote: Is virtual memory entering into the equation? Probably. Memory allocated doesn't physically exist until written to a lot of the time. You can also exceed your RAM in

Re: Beginner memory question.

2022-04-16 Thread Adam Ruppe via Digitalmars-d-learn
On Saturday, 16 April 2022 at 20:41:25 UTC, WhatMeWorry wrote: Is virtual memory entering into the equation? Probably. Memory allocated doesn't physically exist until written to a lot of the time.

Beginner memory question.

2022-04-16 Thread WhatMeWorry via Digitalmars-d-learn
I'm playing around with dynamic arrays and I wrote the tiny program (at bottom). I get the following output: PS C:\D\sandbox> dmd -m64 maxMem.d PS C:\D\sandbox> .\maxMem.exe Reserving 1,610,613,245 elements reserve() returned a size of: 1,610,613,245 The capacity() of big is 1,610,613,245 ulong.