Hi to all
I am developing a code which needs far pointer. But the manual says that RCM4000 and later
version only supports far pointers. I am using root2xmem and xmem2root functions to get
xalloc.
I made a structure for 12 bytes
typedef struct
{
unsigned long rightchild;
unsigned long data;
unsigned long leftchild;
}btreenode;
and using unsigned long *p i store address of host every time. and updating the pointers
using binary tree.
*p = _xalloc(&Node_size, 0, XALLOC_ANY);
node.left = node.right = 0;
node.dat = value;
root2xmem( *p, &node, sizeof(node));
What i am trying to do with this is, When i add a user detail i am searching them in the
xmem to be sure that my entering data is not exist. so after conformed this i am
sortingthem using binary tree.
Though my value is a unsigned long variable which holds 4 byte data always. Hence 1 record
holds 12 bytes in the memory i.e left pointer is 4 bytes , data is 4 bytes and right
pointer is 4 bytes. i need to store 15000 records minimum. Since I have 512k RAM and 512k
SF but i have some reserve space in RAM for some other purpose. RCM3720.
So my DC 9.25 doesnt support far pointer . RCM4000 onwards they have given this option. It
would be great full if we have far pointer for my 3700.
Here binary tree makes my each record size as 12 bytes. So i am looking for some other
alternatives to reduce my each record size. So help me on this.
------------------------------------

(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )
d...@solus.co.in wrote:
> Hi to all
> I am developing a code which needs far pointer. But the manual says that RCM4000 and
later version only supports far pointers. I am using root2xmem and xmem2root functions to
get xalloc.
>
> I made a structure for 12 bytes
>
typedef struct
> {
> unsigned long rightchild;
> unsigned long data;
> unsigned long leftchild;
> }btreenode;
>
and using unsigned long *p i store address of host every time. and updating the
pointers using binary tree.
>
*p = _xalloc(&Node_size, 0, XALLOC_ANY);
> node.left = node.right = 0;
> node.dat = value;
>
> root2xmem( *p, &node, sizeof(node));
>
> What i am trying to do with this is, When i add a user detail i am searching them in the
xmem to be sure that my entering data is not exist. so after conformed this i am
sortingthem using binary tree.
>
> Though my value is a unsigned long variable which holds 4 byte data always. Hence 1
record holds 12 bytes in the memory i.e left pointer is 4 bytes , data is 4 bytes and
right pointer is 4 bytes. i need to store 15000 records minimum. Since I have 512k RAM and
512k SF but i have some reserve space in RAM for some other purpose. RCM3720.
>
> So my DC 9.25 doesnt support far pointer . RCM4000 onwards they have given this option.
It would be great full if we have far pointer for my 3700.
>
> Here binary tree makes my each record size as 12 bytes. So i am looking for some other
alternatives to reduce my each record size. So help me on this.
>
You could always use the Softools compiler; it supports far pointers on
the 2k and 3k processors. Although DC has non-ANSI features (costates,
rabbitweb) that do not port easily.
If you store the nodes as an array, you could use an short array index
to store the right/leftchild. Would reduce the node to 8 bytes.
--
------------------------------------------
| Scott G. Henion| s...@shdesigns.org |
| Consultant | Stone Mountain, GA |
| SHDesigns http://www.shdesigns.org |
------------------------------------------
today's fortune
hacker, n.:
Originally, any person with a knack for coercing stubborn inanimate
things; hence, a person with a happy knack, later contracted by the
mythical philosopher Frisbee Frobenius to the common usage, 'hack'.
In olden times, upon completion of some particularly atrocious body
of coding that happened to work well, culpable programmers would gather
in a small circle around a first edition of Knuth's Best Volume I by
candlelight, and proceed to get very drunk while sporadically rending
the following ditty:
Hacker's Fight Song
He's a Hack! He's a Hack!
He's a guy with the happy knack!
Never bungles, never shirks,
Always gets his stuff to work!
All take a drink (important!)
------------------------------------
______________________________
controlSUITE software. Comprehensive. Intuitive. Optimized.
Real-world software for real-time control. Details Here!

(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )