a problem about windows memory

R

richi

Hi everyone,

I am sorry, my english is not good!

I found a problem about memory. In a function I malloced more memory than
before
that is 4.5625Kb in theory. Then I watched the memory size of the function
in Linux and
Unix through the command of "ps". After comparing with the early memory
size of
the function which didn't have change, I found the increaseded size was
different! In Linux and Unix
the size is about 4Kb, but in windows the size watched from task manager is
far more
than 4Kb.

can anyone help me and explain the phenomenon,please?
 
J

jacob navia

richi said:
Hi everyone,

I am sorry, my english is not good!

I found a problem about memory. In a function I malloced more memory
than before
that is 4.5625Kb in theory. Then I watched the memory size of the
function in Linux and
Unix through the command of "ps". After comparing with the early memory
size of
the function which didn't have change, I found the increaseded size was
different! In Linux and Unix
the size is about 4Kb, but in windows the size watched from task manager
is far more
than 4Kb.

can anyone help me and explain the phenomenon,please?

Probably under linux your memory is just reserved, not really allocated
until you try to use it. Under windows, probably more memory is
allocated right away.
 
I

Ian Collins

Try asking on comp.unix.programmer. How the OS manages memory is
platform specific.
Probably under linux your memory is just reserved, not really allocated
until you try to use it. Under windows, probably more memory is
allocated right away.

Linux can do this, but Unix versions tend not to. The OP doesn't say
which one was used.
 
R

richi

thank for your answer !
but I had tried hunderds of times, and the result is the same.
Under Linux and HP-Unix, the increased memory size was about 4Kb at all
times
But Under Windows the increased was not fixed, e.g. 4Kb, 8Kb, 16Kb.
I don't know why! Does it probably relate to the page size of operating
system?
 
I

Ian Collins

richi wrote:

[Please don't top post]
thank for your answer !
but I had tried hunderds of times, and the result is the same.
Under Linux and HP-Unix, the increased memory size was about 4Kb at all
times
But Under Windows the increased was not fixed, e.g. 4Kb, 8Kb, 16Kb.
I don't know why! Does it probably relate to the page size of operating
system?
Could be, try an OS group, you'll get more sense there.
Please don't quote signature blocks.
 
R

richi

thanks for your advice!
Ian Collins said:
Try asking on comp.unix.programmer. How the OS manages memory is
platform specific.


Linux can do this, but Unix versions tend not to. The OP doesn't say
which one was used.
 
R

richi

Sorry. I am a new fish here!

What is the meaning of ~top post~?

How to avoid ~top post~?
 
C

CBFalconer

richi said:
I am sorry, my english is not good!

I found a problem about memory. In a function I malloced more
memory than before that is 4.5625Kb in theory. Then I watched the
....

Please explain how you can allocate 1/2 a byte. Either in practice
or in theory.
 
C

CBFalconer

richi said:
Sorry. I am a new fish here! What is the meaning of ~top post~?
How to avoid ~top post~?

Please do not top-post. Your answer belongs after (or intermixed
with) the quoted material to which you reply, after snipping all
irrelevant material. See the following links:

<http://www.catb.org/~esr/faqs/smart-questions.html>
<http://www.caliburn.nl/topposting.html>
<http://www.netmeister.org/news/learn2quote.html>
<http://cfaj.freeshell.org/google/> (taming google)
<http://members.fortunecity.com/nnqweb/> (newusers)
 
B

Ben Bacarisse

CBFalconer said:
...

Please explain how you can allocate 1/2 a byte. Either in practice
or in theory.

Why do you think the OP is claiming that? (4672 is exactly 4.5625Kb
using the usual computer meaning of K.)
 
C

CBFalconer

Ben said:
Why do you think the OP is claiming that? (4672 is exactly 4.5625Kb
using the usual computer meaning of K.)

There you are. I am old fashioned and old, and tend to use decimal
orientation. :)
 
M

MisterE

Why do you think the OP is claiming that? (4672 is exactly 4.5625Kb
using the usual computer meaning of K.)

and here i was thinking he had some sort of nibble based computer
 

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

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top