Pthread_create and memory issues.

From: Cole (cole_at_opteqint.net)
Date: 05/22/04

  • Next message: Simon Barner: "Looking for a ports committer for valgrind (Re: Memory Leak)"
    To: <freebsd-hackers@freebsd.org>
    Date: Sat, 22 May 2004 21:39:44 +0200
    
    

    Hi

    Ok this is just a more direct question that the thread Memory Leak.

    I have a program using pthread_create, and it runs fine, no compile errors
    or warnings, it all works fine, not a single issue, but it very very slowly
    uses up memory. The program creates a fixed number of threads, and after
    each one has run to completion it stores them for a while for use again if
    needed soon, else it destroys them after a specified amount of time.

    Now i have tried to use ElectricFence to try track down the program, and it
    created cores all pointing round about to pthread_create. So then i tried
    to use mpatrol, and it either doesnt even crash, or cause errors, or it
    creates a core file that is so large with so many instructions, that is well
    over 1000 instruction calls, but as far as i can see they both seem to be
    pointing to pthread_create. With mpatrol i set MPATROL_OPTIONS=LEAKTABLE,
    but it never produces any output and crashes before i can even test the
    program. It also uses up close to 100% of the cpu before crashing.

    I was just wondering if anyone else has had any other memory debugging
    program suggestions, or has had any issues with pthread_create.

    If you want i can post the code or at the very least my pthread_create call.

    Thanks
    /Cole

    _______________________________________________
    freebsd-hackers@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
    To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"


  • Next message: Simon Barner: "Looking for a ports committer for valgrind (Re: Memory Leak)"

    Relevant Pages

    • Re: Superstitious learning in Computer Architecture
      ... Without a LOT of logic or some other better approach, re-executing the instructions requires re-decoding and it ties up the cache memory bus transferring more data as instructions than the instructions are working on. ... There is most of an order of magnitude in speed sacrificed by even HAVING a cache in a single ALU system, and more than an order of magnitude in multiple-ALU systems! ...
      (comp.arch.arithmetic)
    • Re: Iyonix instruction timings and RAM speed results
      ... I get 166/127 for main RAM and 5.7/62 for PCI Video memory on my original ... unrolled LDM/STM instructions for these, ... "add floating point" instruction takes almost 200 clock cycles, ... MOV R0,R0,LSL #1 ...
      (comp.sys.acorn.misc)
    • PART 3. Why it seems difficult to make an OOO VAX competitive (really long)
      ... implementations, compared to high-performance RISCs, but also to IA-32. ... "The VAX is so tied to microcode we predict it will be impossible to ... most frequently-used instructions can be converted to a small number ... given the increasing relative latency to memory. ...
      (comp.arch)
    • Re: Cost of calling a standard library function
      ... > sense, since push Allocates memory, and pop deallocates it. ... Hence, all the CPU does is, basically: ... so forth...it's even possible to get "free" instructions (effectively ... what else is an ASM coder's job? ...
      (alt.lang.asm)
    • Re: [SLE] For or against ..Hyperthreading.
      ... > Let's say for mail or Database server... ... Opteron and Athlon-64 also have a different memory access archetecture so ... - 64-bit Address registers means more memory is directly addressable, ... do a wider range of operations as primitive instructions (for example, fetch, ...
      (SuSE)