×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Registered User
    Join Date
    May 2009
    Posts
    35

    Storage location of Strings in functions

    hai all,
    Where are Strings stored in functions.Whether on stack or some other place.


    Regards,
    siva.

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,689

    Re: Storage location of Strings in functions

    If you mean TBuf-s, they are stored on the stack. Having big/many TBuf-s will cause panic (KERN-EXEC 3 if I remember correctly).

  3. #3
    Super Contributor
    Join Date
    Mar 2004
    Location
    Bangalore,India
    Posts
    2,146

    Re: Storage location of Strings in functions

    Quote Originally Posted by sivareddy_jntu View Post
    hai all,
    Where are Strings stored in functions.Whether on stack or some other place.


    Regards,
    siva.
    Would depend on how you are using it, if its the TBufs it would be the Stack, if its the HBufC it would be on the heap, if its the former you dont have to worry about deleting/cleaning it up, if its the latter you have to cleanup the memory used else you would be leaking the mem used.

    Cheers,
    Mayank

  4. #4
    Registered User
    Join Date
    May 2009
    Posts
    35

    Re: Storage location of Strings in functions

    Thanks for u replay.

    I have following C code in my Symbian project(b'coz i am porting a C project into symbian)

    #include <stdio.h>

    int fun()
    {
    char *ptr = "My function is fun";
    ......
    .....
    .....
    ......
    }


    where is "My function is fun" is stored when i run this programme on N80 mobile.Whether stack or some other location.


    Any help will be appreciated greatly.


    Regards,
    siva reddy.

  5. #5
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,689

    Re: Storage location of Strings in functions

    "blabla" is a global constant (just having a local visibility), so it is stored amongst other globals.
    char* is a pointer, local variable, stored on the stack.

  6. #6
    Registered User
    Join Date
    May 2009
    Posts
    35

    Re: Storage location of Strings in functions

    Thanks for quick replay.

    Now i understood the concept.

    Regards,
    siva.

  7. #7
    Registered User
    Join Date
    May 2009
    Posts
    35

    Re: Storage location of Strings in functions

    hai,

    what is meant by L"string".Here What does L do.

    Any help would be appreciated greatly.


    Regards,
    siva.

  8. #8
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,689

    Re: Storage location of Strings in functions

    Indicates 16-bit characters, for Unicode string constants.

Similar Threads

  1. Issue when trying to generate .sis file
    By rmulam in forum Symbian Tools & SDKs
    Replies: 9
    Last Post: 2009-08-13, 14:10
  2. s60 3rd ed emulator crash
    By Kimau in forum Symbian Tools & SDKs
    Replies: 2
    Last Post: 2008-06-18, 22:12
  3. where is python location on mobile phone
    By lb213_2000 in forum Symbian
    Replies: 1
    Last Post: 2007-11-05, 08:56
  4. Prevent RMS being copied or invisible storage location on mobile
    By roneypatel in forum Mobile Java General
    Replies: 4
    Last Post: 2006-03-14, 04:45

Posting Permissions

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