RE: Re: Large buffers

"Jesus Manuel Conejo Sarabia" <[email protected]>
Newsgroups gmane.comp.hardware.rabbit-semiconductor
Message-ID <000901ce530d$1f468a80$5dd39f80$@com>
 

 

Hi Peter,

                Where can i read a bit about it?, is there any example in
Dynamic C to study it?

 

Thanks!

Jesus

 

 

 

De: [email protected] [mailto:[email protected]] En
nombre de petermcs
Enviado el: viernes, 17 de mayo de 2013 16:37
Para: [email protected]
Asunto: [rabbit-semi] Re: Large buffers

 

  

Dynamic C has trouble accessing arrays over 32K in length but will allow you
create them. For example I have the following in my code:

bbram far TL_DATA_REC Logs[TL_DEFAULT_LOGS][TL_DEFAULT_ENTRIES];

which allocates 192000 bytes as TL_DATA_REC is 10 bytes in length and the
array is 8x4000;

I then use far pointers to TL_DATA_RECs to access the data in the arrays.

The advantage of doing this is that the arrays are allocated at compile time
so you know exactly where they will end up and how much memory is left over
afterwards - xalloc() can fail dependinf on fragmentation etc so you need to
do run time checks when you allocate using it.

Regards,
Peter

--- In  <mailto:rabbit-semi%40yahoogroups.com> [email protected],
"Jesus Manuel Conejo Sarabia" < <mailto:jmconejo@...> jmconejo@...> wrote:
>
> 
> 
> Hi Phil,
> 
> Thanks for the answer. I will try what you say.
> 
> 
> 
> Thanks
> 
> Jesus
> 
> 
> 
> 
> 
> 
> 
> 
> 
> De: [email protected] <mailto:rabbit-semi%40yahoogroups.com>
[mailto:[email protected] <mailto:rabbit-semi%40yahoogroups.com> ]
En
> nombre de Phil D
> Enviado el: jueves, 16 de mayo de 2013 10:03
> Para: [email protected] <mailto:rabbit-semi%40yahoogroups.com> 
> Asunto: Re: [rabbit-semi] Large buffers
> 
> 
> 
> 
> 
> the XMEM functions allow for some large arrays to be stored biggest i have
> is 150 x 100 but you could make something bigger.
> 
> im using my xmem to store some large data structures heres an example of
> initialisation
> 
> Zone_point is a long holding starting address.
> 
> 
> 
> Zone_point=xalloc(sizeof(Zone_XMEM)*ZONE_MAX);//Allocate zones in xmem
> 
> for(x_i=0;x_i<(sizeof(Zone_XMEM)*ZONE_MAX);x_i+=sizeof(Zone_XMEM)){
> 
> root2xmem(Zone_point+x_i, &Zone_XMEM, sizeof(Zone_XMEM) );
> 
> }
> 
> 
> 
> 
> 
> getting somthing out eg
> 
> 
> 
> xmem2root(&ZoneD, Zone_point+(n*sizeof(ZoneD)), sizeof(ZoneD));
> 
> 
> 
> Phil
> 
> 
> 
> 
> 
> On 15 May 2013 21:48, Jesus Manuel Conejo Sarabia
> <jmconejo@...> wrote:
> 
> 
> 
> Hi!,
> 
> I'm working in a project with a Rabbit6000 and a little cam.
> I want to store temporaly frames of the cam. I'm testing on using the RAM
> (variables, large arrays) to store the frames but I have not enough space.
I
> don't want to use RCM modules with serial eeprom or sd cards because as
you
> know the eeproms have limits on the number of writings so the idea is to
use
> RAM. Have you experience using large buffers on RAM (variables). Have you
> touched on BIOSLIB to get this way?, which is the limit? 
> 
> 
> 
> Thanks
> 
> Jesus
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.