a problem about windows memory

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • richi

    a problem about windows memory

    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,plea se?

  • jacob navia

    #2
    Re: a problem about windows memory

    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,plea se?
    >
    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

    Comment

    • Ian Collins

      #3
      Re: a problem about windows memory

      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,plea se?
      Try asking on comp.unix.progr ammer. 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.

      Comment

      • richi

        #4
        Re: a problem about windows memory

        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" <jacob@nospam.c omwrote in message
        news:gbfkp2$i8t $1@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,plea se?
        >>
        >
        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

        Comment

        • richi

          #5
          Re: a problem about windows memory

          thanks for your advice!
          "Ian Collins" <ian-news@hotmail.co mwrote in message
          news:6k143eF5ed c8U5@mid.indivi dual.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,plea se?
          >
          Try asking on comp.unix.progr ammer. 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.

          Comment

          • Ian Collins

            #6
            Re: a problem about windows memory

            richi wrote:

            [Please don't top post]
            "jacob navia" <jacob@nospam.c omwrote in message
            news:gbfkp2$i8t $1@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,plea se?
            >>>
            >>
            >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.

            Comment

            • richi

              #7
              Re: a problem about windows memory

              Sorry. I am a new fish here!

              What is the meaning of ~top post~?

              How to avoid ~top post~?

              Comment

              • CBFalconer

                #8
                Re: a problem about windows memory

                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.

                Comment

                • CBFalconer

                  #9
                  Re: a problem about windows memory

                  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.htm l>
                  <http://cfaj.freeshell. org/google/ (taming google)
                  <http://members.fortune city.com/nnqweb/ (newusers)

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

                  Comment

                  • Ben Bacarisse

                    #10
                    Re: a problem about windows memory

                    CBFalconer <cbfalconer@yah oo.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.

                    Comment

                    • CBFalconer

                      #11
                      Re: a problem about windows memory

                      Ben Bacarisse wrote:
                      CBFalconer <cbfalconer@yah oo.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.

                      Comment

                      • MisterE

                        #12
                        Re: a problem about windows memory

                        >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

                        Comment

                        Working...