Find the answer to your Linux question:
Results 1 to 2 of 2
Hi everyone, (I've already posted this one on the general forum, but this is probably more suitable). I'm working with LinuxThreads (glibc2.3) on an Embedded system (MontaVista 3.1 distribution). I ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2006
    Posts
    1

    Question LinuxThreads - Stack size and Memory consumption


    Hi everyone,
    (I've already posted this one on the general forum, but this is probably more suitable).
    I'm working with LinuxThreads (glibc2.3) on an Embedded system (MontaVista 3.1 distribution).
    I have several problems with the threads memory consumption:
    1. Is there an option to limit the stack size?
      If I understand correctly, in LinuxThreads, regardless of the scheduling policy, the stack size of each thread starts as 4KB and grows up to 2MB.
      Is that true?
      Is there a mode for a static non-growing stack?
    2. How do I measure the actual memory consumption of each thread?
      Using ps/top/proc is problematic since it does not show the actual memory usage - because of the "copy on write principle".
      Any idea?

  2. #2
    Linux User fernape's Avatar
    Join Date
    Dec 2005
    Location
    Holland
    Posts
    301
    For the second problem, try with a profiler similar to valgrind. It usually throws a lot of information and deals fine with threads.

    For the first question, maybe you want to send it to kernelnewbies.

    Best Regards

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •