By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,230 Members | 2,471 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,230 IT Pros & Developers. It's quick & easy.

a problem about windows memory

P: n/a
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?

Sep 25 '08 #1
Share this Question
Share on Google+
11 Replies


P: n/a
richi wrote:
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.
--
jacob navia
jacob at jacob point remcomp point fr
logiciels/informatique
http://www.cs.virginia.edu/~lcc-win32
Sep 25 '08 #2

P: n/a
jacob navia wrote:
richi wrote:
>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?
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.

--
Ian Collins.
Sep 25 '08 #3

P: n/a
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?
"jacob navia" <ja***@nospam.comwrote in message
news:gb**********@aioe.org...
richi wrote:
>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.
--
jacob navia
jacob at jacob point remcomp point fr
logiciels/informatique
http://www.cs.virginia.edu/~lcc-win32
Sep 25 '08 #4

P: n/a
thanks for your advice!
"Ian Collins" <ia******@hotmail.comwrote in message
news:6k************@mid.individual.net...
jacob navia wrote:
>richi wrote:
>>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?

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.

--
Ian Collins.
Sep 25 '08 #5

P: n/a
richi wrote:

[Please don't top post]
"jacob navia" <ja***@nospam.comwrote in message
news:gb**********@aioe.org...
>richi wrote:
>>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.
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.
>--
jacob navia
jacob at jacob point remcomp point fr
logiciels/informatique
http://www.cs.virginia.edu/~lcc-win32
Please don't quote signature blocks.

--
Ian Collins.
Sep 25 '08 #6

P: n/a
Sorry. I am a new fish here!

What is the meaning of ~top post~?

How to avoid ~top post~?
Sep 25 '08 #7

P: n/a
richi wrote:
>
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.

--
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>
Try the download section.
Sep 25 '08 #8

P: n/a
richi wrote:
>
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)

--
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>
Try the download section.
Sep 25 '08 #9

P: n/a
CBFalconer <cb********@yahoo.comwrites:
richi wrote:
>>
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.
Why do you think the OP is claiming that? (4672 is exactly 4.5625Kb
using the usual computer meaning of K.)

--
Ben.
Sep 25 '08 #10

P: n/a
Ben Bacarisse wrote:
CBFalconer <cb********@yahoo.comwrites:
>richi wrote:
>>>
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.

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. :-)

--
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>
Try the download section.
Sep 26 '08 #11

P: n/a
>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.)
and here i was thinking he had some sort of nibble based computer
Sep 26 '08 #12

This discussion thread is closed

Replies have been disabled for this discussion.