On 2月25日, 上午9时33分, Jeff Schwab <j...@schwabcenter.com> wrote:
> remlostime wrote:
> > On 2月25日, 上午2时53分, Michael Ekstrand <mich....@elehack.net> wrote:
> >> remlostime <remlost...@gmail.com> writes:
> >>> now, i wanna how much memory my program use, what code should i add
> >>> to my code, or is there some program that can test it?
> >> How you can do that is usually platform-specific and can be
> >> complicated (e.g., on some platforms there isn't a nice number you can
> >> look at and say "there, that's how much memory it uses!").
>
> >> Your best option is probably to use a memory profiler such as the
> >> Massif heap profiler that comes with Valgrind or the one in Apple's
> >> development tools. A newsgroup or discussion forum specific to
> >> development for your operating environment would be the appropriate
> >> place to seek more information on the subject.
>
> >> - Michael
>
> >> --
> >> mouse, n: A device for pointing at the xterm in which you want to type.
>
> > i'm using fc7
>
> top
>
> What you care about is probably RSS or RES, the "resident set size."
I dont know what the difference between them, actually i wanna know
can i insert some code to my program and when it
ends it will show the sum of used memory
|