A memory question

I

Ingo Menger

Keith said:
Probably because galloons (narrow bands or braids used as trimming and
commonly made of lace, metallic thread, or embroidery) aren't very
efficient containers for heating oil.

Okay. :)
Actually, I measure heating oil in liters.
 
I

Ingo Menger

Old said:
You live in your car?

No. BTW, here in germany, it is against the law to drive your diesel
car with heating oil. Diesel fuel, which is chemically the same, costs
twice as much due to fuel taxes.
 
M

Malcolm

Hello it takes about 30M memory to run my program.
Can anyone give me some suggestions on why it costs so much memory?
Thanks a lot!
Firstly, add up your allocations and stack usage.
If you find they come to around 30Mb, then there's your answer.
Sometimes if you allocate a huge number of tiny structures the compiler will
pad them out to the nearest kilobyte, gobbling lots of memory.

Then look at the library functions you are calling. How much memory does
"Hello world" take on your platform? If "hello world" is small, cut the
program down to "hello world" and then gradually comment functionality back
in. That should tell you where the memory is going.
 
M

Malcolm

Richard Heathfield said:
#include <stdio.h>
void main(void)
{
char buf[31457280] = "hello world";
puts(buf);
return 0;
}
...that's a very curious number which, I am convinced, was carefully
chosen
for a certain property it has. If I'm right, then I would guess that your
main error was deliberate, too.
Oh well, I guess I'll blame my compiler... it is a pig ;)

Could I suggest gcc instead? Pigs are not particularly celebrated for
their
ability to produce particularly efficient object code.
If it's a pig of a compiler it ought to be able to chomp up pies quite
nicely.
 
R

Randy Howard

Mark McIntyre wrote
(in article said:
On 16 Nov 2005 13:22:33 -0800, in comp.lang.c ,


Please read the Hitchikers Guide to the Galaxy. The meaning of "42"
will then become clear.

Actually, it won't as I recall. I thought you had to read the
sequel to find out its meaning??? It's been a number of years,
perhaps I have it wrong.
 
J

Joe Wright

Randy said:
Mark McIntyre wrote



Actually, it won't as I recall. I thought you had to read the
sequel to find out its meaning??? It's been a number of years,
perhaps I have it wrong.
I think I read that after several years, the computer calculated that 42
was indeed the answer, but that the question was flawed. Much too
esoteric for me anymore.
 
M

Mark McIntyre

I think I read that after several years, the computer calculated that 42
was indeed the answer, but that the question was flawed.

Thats about the size of it...
 
M

Markus Becker

Joe Wright said:
I think I read that after several ...

.... million ...
.. years, the computer calculated that 42
was indeed the answer ...

.... to the question of 'life, the universe and everything',
but that the question was flawed. Much too
esoteric for me anymore.

The computer (*Deep Thought*) that had calculated the answer had
warned its creators that his answer would not please them,
because they were not really aware of the question.

But he had already constructed a massively greater, faster,
better computer to calculate the question to this answer.
This computer was - or is, for that matter - called:

'*The Earth*'

Us mere humans were/are/have been/will be an integral part of
the organic matrix of that computer, which, by the way, was run
by the most intelligent species on earth; no, not humans nor
dolphins, but mice. Unfortunately, shortly before the completion
of the calculation, earth was (will have been destroyed - it's
not easy to talk of the future as something from the past - look
up temporal grammar in the Hitchhiker's Guide to the Galaxy)
destroyed to make place for an interplanetary hyperspace-
express-route by the Vogons.

Know where your towel is and:
Don't panic!

hth, Markus
 
S

SM Ryan

#
# > I think I read that after several ...
#
# ... million ...
#
# > .. years, the computer calculated that 42
# > was indeed the answer ...
#
# ... to the question of 'life, the universe and everything',
#
# > but that the question was flawed. Much too
# > esoteric for me anymore.
#
# The computer (*Deep Thought*) that had calculated the answer had
# warned its creators that his answer would not please them,
# because they were not really aware of the question.

9x6 = 42 in radix 13.
 
P

pete

SM said:
#
# > I think I read that after several ...
#
# ... million ...
#
# > .. years, the computer calculated that 42
# > was indeed the answer ...
#
# ... to the question of 'life, the universe and everything',
#
# > but that the question was flawed. Much too
# > esoteric for me anymore.
#
# The computer (*Deep Thought*) that had calculated the answer had
# warned its creators that his answer would not please them,
# because they were not really aware of the question.

9x6 = 42 in radix 13.

"Nobody writes jokes in base 13" -- Douglas Adams
 
K

Keith Thompson

[ stupid '#' quoting character fixed ]
pete said:
"Nobody writes jokes in base 13" -- Douglas Adams

#include <stdio.h>

#define SIX 1+5
#define NINE 8+1

int main(void)
{
printf("%d * %d = %d\n", SIX, NINE, SIX * NINE);
return 0;
}
 
K

Kenneth Brody

]///\
#include <stdio.h>

#define SIX 1+5
#define NINE 8+1

int main(void)
{
printf("%d * %d = %d\n", SIX, NINE, SIX * NINE);
return 0;
}

Ooh! Shiny! And back (sort of) on topic for CLC.

I wonder how long before a newbie posts "how does that work"?

--
+-------------------------+--------------------+-----------------------------+
| Kenneth J. Brody | www.hvcomputer.com | |
| kenbrody/at\spamcop.net | www.fptech.com | #include <std_disclaimer.h> |
+-------------------------+--------------------+-----------------------------+
Don't e-mail me at: <mailto:[email protected]>
 
O

Old Wolf

The computer (*Deep Thought*) that had calculated the answer had
Kenneth said:
I wonder how long before a newbie posts "how does that work"?

The computer took 7.5 million years to compute its answer,
and it was built 17.5 million years ago.

According to Moore's Law, the same calculation could be done in
a fraction of a second today. This program is clearly repeating
Deep Thought's work, and since DT was such a great computer,
getting the same answer.
 
M

Mabden

Randy Howard said:
Mark McIntyre wrote

"The Answer". To the question. Of Life. The Universe. Well, Everything,
really.

Your job: figure out "the Question".
Actually, it won't as I recall. I thought you had to read the
sequel to find out its meaning???

No, that won't help.
It's been a number of years,
perhaps I have it wrong.

Yes, that's it. ;-)

So long, and thanks for all the..., well just thanks.
 
K

Kenneth Brody

Mabden wrote:
[...]
"The Answer". To the question. Of Life. The Universe. Well, Everything,
really.

Your job: figure out "the Question". [...]
So long, and thanks for all the..., well just thanks.

I hereby propose a new auto-ack for "spoof@..." addresses:

So long, and thanks for all the phish.

--
+-------------------------+--------------------+-----------------------------+
| Kenneth J. Brody | www.hvcomputer.com | |
| kenbrody/at\spamcop.net | www.fptech.com | #include <std_disclaimer.h> |
+-------------------------+--------------------+-----------------------------+
Don't e-mail me at: <mailto:[email protected]>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,173
Messages
2,570,938
Members
47,475
Latest member
NovellaSce

Latest Threads

Top