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

  • Home
  • SEARCH
  • 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 6375593
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:38:07+00:00 2026-05-25T01:38:07+00:00

While developing a piece of software for embedded system I used realloc() function many

  • 0

While developing a piece of software for embedded system I used realloc() function many times. Now I’ve been said that I “should not use realloc() in embedded” without any explanation.

Is realloc() dangerous for embedded system and why?

  • 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-25T01:38:08+00:00Added an answer on May 25, 2026 at 1:38 am

    Yes, all dynamic memory allocation is regarded as dangerous, and it is banned from most “high integrity” embedded systems, such as industrial/automotive/aerospace/med-tech etc etc. The answer to your question depends on what sort of embedded system you are doing.

    The reasons it’s banned from high integrity embedded systems is not only the potential memory leaks, but also a lot of dangerous undefined/unspecified/impl.defined behavior asociated with those functions.

    EDIT: I also forgot to mention heap fragmentation, which is another danger. In addition, MISRA-C also mentions “data inconsistency, memory exhaustion, non-deterministic behaviour” as reasons why it shouldn’t be used. The former two seem rather subjective, but non-deterministic behaviour is definitely something that isn’t allowed in these kind of systems.

    References:

    • MISRA-C:2004 Rule 20.4 “Dynamic heap memory allocation shall not be used.”
    • IEC 61508 Functional safety, 61508-3 Annex B (normative) Table B1, >SIL1: “No dynamic objects”, “No dynamic variables”.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been developing Web applications for a while now and have dipped my toe
I have been extremely naughty. I have been developing a piece of software (I'm
I've been developing GPL'd software for years, but now I need a more restrictive
I've been in the business of developing hardware and software for 19 years now.
While developing my app I have come to realize that the majority of my
After working for a while developing games, I've been exposed to both variable frame
I've been experiencing very inconsistent results while developing an iPhone app and trying to
While developing with Firebug I keep getting this error. pages[x].css(z-index,x) is not a function
While developing a Facebook game, I'm realizing that I can't yet think of a
I am using SVN while developing a WordPress site. Now I want to upload

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.