IN RTOS HAVING 1OKBYTES OF MEMORY AND YOUR PROGRAMM FOR
ASKING FOR 5KBYTES AND YOU GOT NULL ERROR ? WHY DOES IT
BEHAVES LIKE THIS

Answer Posted / feroz ahmed

The problem is because of memory fragmentation..

Though 10KB of memory is available but it will be in
smaller chunks (less than 5KB).. when we request for 5KB
malloc returns NULL as it coudnt find a chunk of size 5KB...

Is This Answer Correct ?    29 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

No New Questions to Answer in this Category !!    You can

Post New Questions

Answer Questions in Different Category