| Pascal Bourguignon 2005-12-19, 2:49 am |
| "apple.davinci" <apple.davinci@gmail.com> writes:
> thanks very much.
> another qusetion:
>
> I had tried this such
> as
>
> while(1)
> {
> char *p = new char[33];
>
> }
>
> when I close the process, I find that the memory can be used is more
> than before I didn't run the process.
>
> any explain.
> I thought when the process is running ,it used some memory which didn't
> belong to it.
> so when it closed and the memory is freed, the memory can be used is
> more than before.
>
> I think it is not a good explain, maybe it is related with some
> knowledge of OS,
> could you give me some tips?
How do you measure the free memory?
Do you realise that unix is a multi-processing OS, that there are a
lot of processes running always at the same time?
To measure the real free memory before and after running a given
process, you would have to suspend all the other processes, including
the shell from which you launch the tested process, and the X server
where the tested process displays its output.
--
__Pascal Bourguignon__ http://www.informatimago.com/
"Klingon function calls do not have "parameters" -- they have
"arguments" and they ALWAYS WIN THEM."
|