Memory Allocation/Accounting bug?

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Markus Rechberger
Date: Tuesday, April 13, 2010 - 11:07 am

Hi,

I was doing some leaktests with our applications and couldn't really
figure out any memory leak (neither with valgrind).
Although top shows up that the application has an increased memory usage.

The sample applications:
#include <stdio.h>
#include <unistd.h>
#include <pthread.h>
#include <stdlib.h>

void *threadfunc(void *opaque) {
        return NULL;
};

int main() {
        pthread_t thread;

        while(1) {
                pthread_create(&thread,  NULL, threadfunc, NULL);
                pthread_join(thread, NULL);
//              sleep(5);
        }
        return 0;
}

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
29931 markus    20   0 16480 460g 381g S   28 11986.0   0:53.00 test

RES shows up 460gig after some time which obviously is not correct

This was tested with Ubuntu Lucid (and Linux 2.6.34-rc2), someone
tested it with 2.6.32 and it seems to be fine.

Markus
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Memory Allocation/Accounting bug?, Markus Rechberger, (Tue Apr 13, 11:07 am)