Re: Assigning data structures to certain memory locations during porting
From: Frank Ch. Eigler (fche_at_redhat.com)
Date: 03/03/05
- Next message: Ian Bell: "Re: Learning embedded systems"
- Previous message: Ian Bell: "Re: Learning embedded systems"
- In reply to: pieter: "Assigning data structures to certain memory locations during porting"
- Next in thread: Darin Johnson: "Re: Assigning data structures to certain memory locations during porting"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 03 Mar 2005 17:28:00 -0500
"pieter" <pieter@gmail.com> writes:
> [...] As an example of something I'm trying to accomplish, suppose I
> have a target machine with a scratch pad, a DRAM, and a Flash
> Memory. I would like to dynamically allocate a memory space for data
> structure A in the scratch pad. [...] and then again dynamically
> allocate data structure C to Flash Memory. How do I accomplish this?
> [...]
You could use a custom dynamic memory allocation library that is aware
of the distinctions. Instead of using plain malloc/free, you would
need an API that also identifies which region you want to allocate
from. (It may also be interesting to consider where such a memory
allocation library would keep its own metadata, if it wanted avoid the
flash memory subject to wear-out or scratchpad memory subject to
exhaustion.)
- FChE
- Next message: Ian Bell: "Re: Learning embedded systems"
- Previous message: Ian Bell: "Re: Learning embedded systems"
- In reply to: pieter: "Assigning data structures to certain memory locations during porting"
- Next in thread: Darin Johnson: "Re: Assigning data structures to certain memory locations during porting"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|