#1 Le 07/04/2011, à 19:21
- cedrix57
Connaitre la taille memoire d'un programme
Bonjour,
Avec le programme time, je peux connaitre le temps d'exécution d'un programme.
Existe-t-il une commande similaire qui pourrait me dire la taille maximum de mémoire qu'a utiliser un programme lancé dans terminale ?
Merci d'avance
Hors ligne
#2 Le 07/04/2011, à 21:52
- aduxas
Re : Connaitre la taille memoire d'un programme
Je n'ai pas de systeme ubuntu en ce moment, mais est-ce que ta commande time connait l'option --format?Je vois ici
The format string
The format is interpreted in the usual printf-like way. Ordinary characters are directly copied, tab, new-
line and backslash are escaped using \t, \n and \\, a percent sign is represented by %%, and otherwise %
indicates a conversion. The program time will always add a trailing newline itself. The conversions follow.
All of those used by tcsh(1) are supported.
Time
%E Elapsed real time (in [hours:]minutes:seconds).
%e (Not in tcsh.) Elapsed real time (in seconds).
%S Total number of CPU-seconds that the process spent in kernel mode.
%U Total number of CPU-seconds that the process spent in user mode.
%P Percentage of the CPU that this job got, computed as (%U + %S) / %E.
Memory
%M Maximum resident set size of the process during its lifetime, in Kbytes.
%t (Not in tcsh.) Average resident set size of the process, in Kbytes.
%K Average total (data+stack+text) memory use of the process, in Kbytes.
%D Average size of the process's unshared data area, in Kbytes.
%p (Not in tcsh.) Average size of the process's unshared stack space, in Kbytes.
%X Average size of the process's shared text space, in Kbytes.
Hors ligne