On Sat, 30 Dec 2000, Adam Langley wrote:

> Some basic MM info:
> 
> When a process fork()'s (vfork()'s or whatever)
> it's page tables are copied and the pages of the new process are
> marked as COW (Copy On Write). If the new process writes to any
> of it's pages the kernel handles a page fault, copies the page and
> maps it back in. The pratical effect being that all memory which
> can be shared, is shared and fork() is fast.
> 
> Now - if you malloc 10MB of memory and fork() you will show up as
> using 20MB of memory, even thou 10MB is actually used. Since fred
> has so many threads, this could be really screwing the memory
> use figures.

AFAIK top understands all this.

  PID USER     PRI  NI  SIZE  RSS SHARE STAT  LIB %CPU %MEM   TIME COMMAND
28558 root       9   0 27048  26M  1588 S       0  0.0 21.4   0:17 java
28563 root       9   0 27048  26M  1588 S       0  0.0 21.4   0:00 java
28564 root       9   0 27048  26M  1588 S       0  0.0 21.4   0:00 java
28565 root       9   0 27048  26M  1588 S       0  0.0 21.4   0:00 java
28566 root       9   0 27048  26M  1588 S       0  0.0 21.4   0:00 java
28567 root       9   0 27048  26M  1588 S       0  0.0 21.4   0:00 java
28568 root       9   0 27048  26M  1588 S       0  0.0 21.4   0:01 java
28602 root       9   0 27048  26M  1588 S       0  0.0 21.4   0:00 java
28603 root       9   0 27048  26M  1588 S       0  0.0 21.4   0:00 java
28604 root       9   0 27048  26M  1588 S       0  0.0 21.4   0:00 java
28605 root       9   0 27048  26M  1588 S       0  0.0 21.4   0:00 java
28606 root       9   0 27048  26M  1588 S       0  0.0 21.4   0:00 java
28607 root       9   0 27048  26M  1588 S       0  0.0 21.4   0:00 java
28608 root       9   0 27048  26M  1588 S       0  0.0 21.4   0:00 java
28615 root       9   0 27048  26M  1588 S       0  0.0 21.4   0:01 java
28682 root       9   0 27048  26M  1588 S       0  0.0 21.4   0:00 java
28688 root       9   0 27048  26M  1588 S       0  0.0 21.4   0:00 java
28709 root       9   0 27048  26M  1588 S       0  0.0 21.4   0:00 java
28711 root       9   0 27048  26M  1588 S       0  0.0 21.4   0:00 java
28733 root       9   0 27048  26M  1588 S       0  0.0 21.4   0:00 java
28762 root       9   0 27048  26M  1588 S       0  0.0 21.4   0:00 java
28773 root      10   0 27048  26M  1588 S       0  2.2 21.4   0:00 java
28807 root       9   0 27048  26M  1588 S       0  0.0 21.4   0:00 java
28842 root       9   0 27048  26M  1588 S       0  0.0 21.4   0:00 java

Right? (My node has only been running for maybe five minutes, hence the
low memory consumption. Before I killed it it was eating 56%.)


-- 
Mark Roberts
[EMAIL PROTECTED]


_______________________________________________
Freenet-dev mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/mailman/listinfo/freenet-dev

Reply via email to