Jump to page: 1 25  
Page
Thread overview
Pop quiz [memory usage]
Jun 06, 2009
Vladimir Panteleev
Jun 06, 2009
bearophile
Jun 06, 2009
bearophile
Jun 07, 2009
Christian Kamm
Jun 07, 2009
Fawzi Mohamed
Jun 08, 2009
Sean Kelly
Jun 08, 2009
Fawzi Mohamed
Jun 06, 2009
Vladimir Panteleev
Jun 06, 2009
bearophile
Jun 06, 2009
Vladimir Panteleev
Jun 06, 2009
bearophile
Jun 06, 2009
BCS
Jun 06, 2009
bearophile
Jun 06, 2009
davidl
Jun 06, 2009
bearophile
Jun 06, 2009
Vladimir Panteleev
Jun 07, 2009
Lionello Lunesu
Jun 07, 2009
Fawzi Mohamed
Jun 07, 2009
Fawzi Mohamed
Jun 06, 2009
Fawzi Mohamed
Jun 06, 2009
Fawzi Mohamed
Jun 06, 2009
Sean Kelly
Jun 06, 2009
bearophile
Jun 06, 2009
Sean Kelly
Jun 07, 2009
Sean Kelly
Jun 07, 2009
davidl
Jun 07, 2009
Denis Koroskin
Jun 07, 2009
Brad Roberts
Jun 08, 2009
Sean Kelly
Jun 06, 2009
Vladimir Panteleev
Jun 06, 2009
Sean Kelly
Jun 06, 2009
Vladimir Panteleev
Jun 06, 2009
Fawzi Mohamed
Jun 07, 2009
Sean Kelly
Jun 07, 2009
Fawzi Mohamed
June 06, 2009
// Works for DMD1/Phobos, DMD1/Tango and DMD2/Phobos
version(Tango) import tango.io.Console;
else           import std.stdio;

struct S
{
	ubyte[40_000] data;
}

void main()
{
	S[] a;
	a ~= S();

	// QUESTION: How much memory will this program consume upon reaching this point?
	version(Tango) Cin.copyln();
	else           readln();
}
June 06, 2009
Vladimir Panteleev:
> 	// QUESTION: How much memory will this program consume upon reaching this
> point?

There's some serious bug here. It allocates 40+ MB.

The following code even crashes LDC during the compilation, I'll ask in the LDC channel:

struct S { ubyte[40_000] d; }
void main() {
    S[] a;
    a ~= S();
}

Bye and thank you for the little test,
bearophile
June 06, 2009
> The following code even crashes LDC during the compilation, I'll ask in the LDC channel:<

The good ChristianK has already added it: http://www.dsource.org/projects/ldc/ticket/320

Bye,
bearophile
June 06, 2009
On Sat, 06 Jun 2009 16:17:10 +0300, bearophile <bearophileHUGS@lycos.com> wrote:
> There's some serious bug here. It allocates 40+ MB.

Um, it should be much more than that. What are you running?

-- 
Best regards,
 Vladimir                          mailto:thecybershadow@gmail.com
June 06, 2009
Vladimir Panteleev:
>Um, it should be much more than that. What are you running?<

I am running DMD v1.042 with Phobos on WinXP, the compilation needs only tents of a second, and at runtime it allocated 48.3 MB.

DMD v2.030 with Phobos needs 49.028 MB and the compilation is a bit slower, 0.35 seconds.

Bye,
bearophile
June 06, 2009
On Sat, 06 Jun 2009 17:11:45 +0300, bearophile <bearophileHUGS@lycos.com> wrote:

> Vladimir Panteleev:
>> Um, it should be much more than that. What are you running?<
>
> I am running DMD v1.042 with Phobos on WinXP, the compilation needs only tents of a second, and at runtime it allocated 48.3 MB.
>
> DMD v2.030 with Phobos needs 49.028 MB and the compilation is a bit slower, 0.35 seconds.

Ah, that's just the working set. Have a look at the virtual memory usage.

-- 
Best regards,
 Vladimir                          mailto:thecybershadow@gmail.com
June 06, 2009
On Sat, Jun 6, 2009 at 10:19 AM, Vladimir Panteleev<thecybershadow@gmail.com> wrote:
> On Sat, 06 Jun 2009 17:11:45 +0300, bearophile <bearophileHUGS@lycos.com> wrote:
>
>> Vladimir Panteleev:
>>>
>>> Um, it should be much more than that. What are you running?<
>>
>> I am running DMD v1.042 with Phobos on WinXP, the compilation needs only tents of a second, and at runtime it allocated 48.3 MB.
>>
>> DMD v2.030 with Phobos needs 49.028 MB and the compilation is a bit slower, 0.35 seconds.
>
> Ah, that's just the working set. Have a look at the virtual memory usage.
>
> --
> Best regards,
>  Vladimir                          mailto:thecybershadow@gmail.com
>

1.5GB.  Wow.
June 06, 2009
Vladimir Panteleev:
> Ah, that's just the working set. Have a look at the virtual memory usage.<

How can I tell them apart? How can I measure that ' virtual memory usage' on Windows?

Bye,
bearophile
June 06, 2009
Hello bearophile,

> Vladimir Panteleev:
> 
>> Ah, that's just the working set. Have a look at the virtual memory
>> usage.<
>> 
> How can I tell them apart? How can I measure that ' virtual memory
> usage' on Windows?
> 
> Bye,
> bearophile

bring up task manager


June 06, 2009
BCS:
> bring up task manager

That's what I have done to take those numbers. Then I have used another small program that has given me similar numbers...

Bye,
bearophile
« First   ‹ Prev
1 2 3 4 5