Some program that I am currently working on consumes much more memory than I think it should. So I am trying to understand how glibc malloc trimming works. I wrote the following test: #include <malloc.h> #include <unistd.h> #define NUM_CHUNKS 1000000 #define CHUNCK_SIZE 100 int main() { // disable fast bins mallopt(M_MXFAST, 0); void** array = (void**)malloc(sizeof(void*) * NUM_CHUNKS); // allocat
I have code like: PID = spawn_link(DistrNode, ...... io:format("~p debug1 ~n",[PID]), io:format("~p debug2 ~n",[pid_to_list(PID)]), and I get like: <10062.97.0> debug1 "<9453.97.0>" debug2 I want grab PID as string but not change value like it did above- what is happening here? I looked convert pid to atom, but no function there. I wanted to get "<10062.97.0>" EDIT it spawn_link() not spawn() this
How do you measure the memory usage of an application or process in Linux? From the blog article of Understanding memory usage on Linux, ps is not an accurate tool to use for this intent. Why ps is "wrong" Depending on how you look at it, ps is not reporting the real memory usage of processes. What it is really doing is showing how much real memory each process would take up if it were the only pr
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く