ARM Technical Support Knowledge Articles

MEMORY ALLOCATION

Applies to: C51 C Compiler

Answer


Information in this article applies to:


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 KEILC51LIB 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)

Article last edited on: 2004-05-17 16:49:15

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential