Keil Logo

C51: MEMORY ALLOCATION


Information in this article applies to:

  • C51 All Versions

QUESTION

Is there any way to dynamically allocate memory on an 8051?

ANSWER

Yes. The source code for the memory allocation routines are found in the \KEIL\C51\LIB folder. You must set up the memory allocation routines to use XDATA for the memory pool. Check the following source files:

INIT_MEM.C (Initializes the memory pool)
CALLOC.C (Calloc routine)
FREE.C (Free routine)
MALLOC.C (Malloc routine)
REALLOC.C (Realloc routine)

Last Reviewed: Monday, May 17, 2004


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.