×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Regular Contributor
    Join Date
    Oct 2003
    Location
    Mumbai
    Posts
    73

    Free Memory Calculation

    Hi All,
    I am using following code to get free memory for Nokia 7650 device.
    TMemoryInfoV1Buf info;
    UserHal::MemoryInfo(info);
    TInt FreeMemory = info().iFreeRamInBytes;
    FreeMemory = FreeMemory / 1024; // for KB
    return FreeMemory;

    I have following observations,
    1) the value shown by this code and the value for free memory as shown by the devices App. Manager are DIFFERENT ????//.
    Am I missing something here?

    2) I require this because I want to put a low memory check before my applications start / operates. Is there any standard memory limit for which I should check. Application records and plays audio in AMR format.

    Thanking you in advance.
    -rave_symbian

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,165
    If I remember right the app manager tells you how much disk space you ahev left, the function in your question gives you the amount of RAM available, so different values caused by measuring different stuff.

    Note that you might also wanna call compress heap function from user class before checking the RAM. You could check the efect by checking the memory then allocating something and freeing it and checking again. Then without heap compression your available memory would be different aften allocatin & freeing is done.

    yucca

  3. #3
    Regular Contributor
    Join Date
    Oct 2003
    Location
    Mumbai
    Posts
    73
    Thanks Yucca.

    Is there any way to programmatically check the disk space as done by the app manager.?

    Regards,
    rave_symbian

  4. #4
    Regular Contributor
    Join Date
    Oct 2003
    Location
    Mumbai
    Posts
    73
    One more question which is confusing me.
    For Nokia 7650 it has a Ram ( C and a ROM (z.
    Am I right in saying that the ram is used both as storage memory and also by the running installed applications? I reckon that on this assumption the free ram calcutaion by above code should be same as shown by application manager.

    Kindly do let me know.

    -rave_symbian

  5. #5
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,165
    you could maybe check Rfs docs, might give you a glue.

    yucca

  6. #6
    Regular Contributor
    Join Date
    Oct 2003
    Location
    Mumbai
    Posts
    73
    Hi All,
    Does anyone has any onformation for which the following devices gives the warning as "Memory too low, delete some data". for
    7650, 3650, 6600 and 9210.

    If anyone has some info do let me know.

    Regards,
    -rave_symbian

  7. #7
    Regular Contributor
    Join Date
    Oct 2003
    Location
    Mumbai
    Posts
    73
    sorry for that badly framed question before.
    Actually I wanted to know the memory limits for these devices for which it gives the LOW MEMORY warning.
    Regards.
    -rave_symbian

  8. #8
    Regular Contributor
    Join Date
    Oct 2003
    Location
    Mumbai
    Posts
    73
    Dear All,
    Has anyone found any way to get the Free DISK space on the device. I am really stuck on it. As said by yucca the Application manager gives the free disk space and the function
    UserHal::MemoryInfo(info);
    TInt FreeMemory = info().iFreeRamInBytes;

    gives the free ram space. I carried out a few steps to verify this and founds following observations on the 7650 which might be useful to someone.
    A few observations regarding the 7650 memory structure,

    It has around 4092 KB of storage space and around 2500 kb of free ram used by the applications to run. 2800 kb is the figure given by the UserHal::MemoryInfo(info); function.
    In case for any application / action using the storage space and during low memory conditions it gives error that memory is not enough. Though 2500 Kb of ram is available it is not used as storage space.
    Any files added by a application get added in the storage memory. When the storage memory is completely filled like by saving some audio files or images then also around 2800KB of ram is free and is displayed by UserHAL::MemoryInfo(). Now when applications are started one by one this operational Ram is used up by the system.
    Now when operational ram is free and freeing up the device storage space does not increase the operational ram in the same rate.

    Let me know if anyone finds way to get the free disk / storage space from the device.

  9. #9
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,165
    check RFs and its Volume() function. The volumeinfo has a iFree member variable that should hold the amount of free disk space in selected drive.

    yucca

  10. #10
    Registered User
    Join Date
    Jul 2004
    Posts
    25

    Volume info

    Hi,

    RFs has a function to get the volume info. You can give the drive as EDriveC;

    TInt err=rfs.Volume(volumeInfo,EDriveC);
    From where you can find the free space. May be this is usefull..

    Thanks,
    Prem.

Posting Permissions

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