Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories

How to understand Linux top command result for a process?

You don't say if you have touched any of the allocated memory or not. Linux (by default) has a slightly unusual memory allocation strategy: when you call malloc the call always succeeds. "But what if there is no memory?" you ask. Well malloc doesn't get you a page of physical memory, just a page in your virtual address space (which is basically limitless). You will get a page fault when you try to access any of these pages and at this point the kernel will find you a physical page for your memory.

So that leaves us with the following:

Q1) RES is unchanged because you didn't ever use any more memory by allocating

Q2) VIRT (virtual memory allocated to task) has increased because you allocated virtual memory. This remains even after you free it, but since it isn't backed by physical memory it really doesn't matter.

I don't think I have enough information to answer Q3.

Categories : C

Related to : How to understand Linux top command result for a process?
How can I execute a command on a remote Linux/Windows machine from a Linux/Windows machine using python?
I suggest using ssh/sftp, via the paramiko library. All major ciphers and hash methods are supported. SFTP client and server mode are both supported too. And it is cross-platform.

Categories : Python
send command line to a linux server with php
You do not have to reinvent the wheel. There are tools out there for monitoring services. They will restart them if needed. Take a look at monit and supervisord

Categories : PHP
C# Not enough storage is available to process this command on Console.ReadLine()
Is the amount of data you're trying to read over 254 characters? Refer to: How to read very long input from console in C#? Console.ReadLine() max length?

Categories : C#
wget command in linux for downloading, But I dont want server to know, I downloaded something
In linux OR in any of the system, if you want to download something from server, you send a request to the server and the server sends some response back. Now,obviously every server at least keeps a log of what all actions are being implemented and what all responses are being generated. At the very minimal, all user history will be flushed at server in minimal server but,even then there is a poss

Categories : Linux
Print all PID from a tasklist command result
I figured it out by myself. The code bellow print all processes PID from an application (in my case : javaw.exe) for /f "tokens=1,2 delims = " %%A in ('tasklist /fi "imagename eq javaw.exe" ^| find ^"javaw^"') do echo %%B My seconds question still has no answer yet.

Categories : Windows
Recently Add
Rewrite of IDA decompiled function
Computing the average of grades in C
passing structures to functions
Use semaphores for handling sockets in C
How to search for a string pattern inside html, coding in C?
sprintf invalid format '%d'
Why can't this c program run correctly?
Low Pass filter in C
Child process does not print anything
C: datatypes. sqrt function working with int why?
How to implement Serial Port Profile Link Command used in ConnectBlue Bluetooth Module?
Rerunning cancelled pthread
How to print out a string that is pointed to by a char pointer?
Can unverified scanf call cause an undefined behavior?
nested structures in C
Portable Makevars for R package using C, GSL and OpenMP with help of Rcpp
program doesn't run(getting RUN FINISHED Segmentation fault core dumped)
Finding the sign of a Lua number, from C
Width of symbols created by gcc's objectcopy
Strange behavior when using free in c program
Can't open image C
Strange C code - dynamic arrays?
C program printing weird characters
Fault in decimal to binary in c
How to detect broken pipe on input?
How can I ivestigate use of the register keyword in C?
File scaning with fscanf
why gcc generates "leal -8240(%ebp), %eax; cmpl $1, %eax; ja XXX" instead of jmp instruction?
Wierd Problems With My Own Custom Written Word Search Algorithm
Trouble with making a shell in C
© Copyright 2017 Publishing Limited. All rights reserved.