Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6847155
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:42:39+00:00 2026-05-27T00:42:39+00:00

I am coding in C for a device that is using ARM architecture. I

  • 0

I am coding in C for a device that is using ARM architecture. I want to check for memory leaks in my application. As in my device in which iam working (ARM architecture ) does not support Valgrind .. so what other options I can use for checking for memory leaks in my application. Is there any way to check for memory leaks … Or please guide what precautions I have to take while writing code so as to avoid memory leaks especially while dealing with strings and dynamic memory allocations ..?

Platform: Linux, gcc compiler

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T00:42:39+00:00Added an answer on May 27, 2026 at 12:42 am

    Don’t use dynamic memory allocation. At least we don’t in Avionics systems.

    I typically use either

    1. malloc the required memory at initialization only.
      If it fails then the more memory is required for the application. This is used in a case where the driver needs to track N objects but N needs to be configurable per project / application.
      On the OS’s I use a max memory value is provided to the OS for the application.

    2. Use a linked list of free and used items
      This works best if the items are of fixed size. Then at initialization the driver reads a configuration items that determines the max items it will support. This could be malloc’d from kernel space. If there is not enough memory the system resources needs to be specified correctly.

    3. Use a memory pool that the application can allocate from but delete only as a whole.
      In embedded OpenGL systems for avionics we allow applications to be able to create objects of variable size. Once the pool is exhausted we return an OUT_OF_MEMORY error. We do NOT allow the application to randomly delete the objects as this would cause memory fragmentation and non-deterministic run time behavior. We do allow them to delete every object and recreate them as required. This has deterministic behavior.

    Everything has some sort of constraint or limit you need to determine based on the system’s needs. That also applies for string data.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Iam coding in c and using sqlite3 as database .I want to ask that
In my application I'm using following coding pattern to vibrate my iPhone device Include:
I changed some code on an android application that was working perfectly fine at
i am new to device driver coding and want to get a clear idea
I have an application which receives GPS data from a mobile device as well
I'm looking at doing embedded coding for a device that's approximately 20MHz, has 6mb
I'm currently working on an application that in addition to the usual visual web
I have some scientific image data that's coming out of a detector device in
Coding i came around to check for the vararg performance of Java. I write
In coding a traditional MVC application, what is the best practice for coding server-side

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.