/var/www/restricted/ssh/stm32/www/stm32circle/ STM CircleOS forum / Using dynamic memory allocation possible ?

Username:     
Password:     
             

Forum

# 1   2009-03-17 23:21:58 Using dynamic memory allocation possible ?

slimphony
Member
Registered: 2009-01-27
Posts: 13

Using dynamic memory allocation possible ?

Hi,

I read from a previous post that it could be possible to use malloc, etc... provided the heap be initialized by setting the "UART0 Putchar" in the LD linker options.

I have tried it out but although the code compiles, the effects are... devastating!

Is it really possible and safe to use the heap ? (it doesn't seem to be used anywhere in CircleOS nor ST libs)

If the answer is positive, how to do ?

Thanks.

Offline

 

# 2   2009-03-18 08:39:03 Using dynamic memory allocation possible ?

Francis
Administrator
From: France-Grenoble
Registered: 2007-07-09
Posts: 890

Re: Using dynamic memory allocation possible ?

At the moment, CircleOS does not provide any memory management. However, you can consider that a CircleOS application can manage its own memory allocation. CircleOS uses only the top of the RAM (and it shares the stack with the application). Thus, you can consider your own heap between the stack and your static variables that are linked at the address 0 (0x20000000).
In the future, we will have to implement a memory allocator for the 'resident applications'. But for the moment, we consider that only one application is running.

Offline

 

# 3   2012-10-19 11:09:56 Using dynamic memory allocation possible ?

yurikov
New member
Registered: 2009-09-16
Posts: 6

Re: Using dynamic memory allocation possible ?

How I can define heap memory for Ride 7?
I wish to use dynamic distribution of SRAM memory (heap) for my ARM microcontroller STM32F103 in environment RKit-ARM for Ride7 (version 1.26.10.0130) with FREE RTOS (V4.6.1). But I can not define of size of heap memory in configuration of project properties of Ride 7. Can someone help me?

Offline

 

Board footer