×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Oct 2007
    Posts
    178

    Question Stack Full, How to get size?

    I'm currently sure that my system is leaking memory and eventually it crashes, but the allocated heap size doesn't increase so it has to do with the stack.

    How do I get stack size in S60 5.0? There use to be GetRamSizes but it's deprecated in S60 9.X.

  2. #2
    Registered User
    Join Date
    Oct 2007
    Posts
    178

    Re: Stack Full, How to get size?

    This way!

    TThreadStackInfo stackInfo;
    if (RThread().StackInfo(stackInfo) == KErrNone)
    {
    TBuf<1> stackCheck;
    int stackPtr = (int)&stackCheck;
    double stackTotal = stackInfo.iBase - stackInfo.iLimit;
    double stackUsed = stackInfo.iBase - stackPtr;
    double stackPercent = (stackUsed/stackTotal)*100;

    LOGTXT("--- STACK ["+QString::number(stackPercent,'g',2)+"%] ---");
    }
    Thanks me!

Similar Threads

  1. Increase Stack Size
    By itdanny33 in forum [Archived] Flash Lite on Nokia Devices
    Replies: 5
    Last Post: 2009-09-23, 04:48
  2. Descriptors and the stack size
    By mabdulmoniem in forum Symbian C++
    Replies: 2
    Last Post: 2007-09-05, 12:20
  3. Symbian 9. Heap size, stack size.
    By Ruger666 in forum Symbian C++
    Replies: 2
    Last Post: 2007-03-26, 11:30
  4. change stack size
    By luoxi in forum Symbian C++
    Replies: 3
    Last Post: 2005-09-01, 05:06
  5. exe stack size
    By cbrueckner in forum Symbian C++
    Replies: 0
    Last Post: 2003-09-12, 11:44

Posting Permissions

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