We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
how i can implement variable length data base ( or data storage structure)in keil C programe?
linked list, B-tree, heap etc...
Ring-buffer?
binary tree...?
hash table...?
yes , i know that but how would i implementing in keil C51, any sample code, which give me idea
We can't spend a week trying to pump random source code into this thread.
You haven't spent any time at all trying to tell us your needs, and exactly what access and allocation patterns you will have. You will have to take the lead, by showing that this is important to you and supply the best information you can.
Think about how you implement them "normally", then check if C51 poses any restrictions on that - Please read the manual: http://www.keil.com/support/man/docs/c51/
You also need to be aware of the limitations of the underlying architecture - why do you actually want to do this on an 8051??
i have another question shall we implement tree data structure in keil c51? if yes, then what size of memory required for data storage
"what size of memory required for data storage[?]"
Are you trolling? Exactly how do you expect anyone here to be able to say how much memory _you_ would need for _your_ application? Remember that you haven't told us anything about the application...
oh! sorry, i m designing C8051F020 based collage student data logger in which i m entering whole details of student (student database) & used for smart card system.
Then I would suggest something simple, like a ring buffer. Easy to throw away old entries when new data arrives and you can't read out the current log.
You will have to compute yourself your needs.
How large user ID number for each log entry? How much data for the time stamp? Depends on how long time you must be able to span, and your required resolution. How much data for additional information, such as ok/fail on PIN code entering etc.
But your project includes thinking about these kind of things. You will have to make a design. You will then have to review it. Then you will have to modify any weak spots you find. Then you implement and debug.
I think Parkinson's Law applies here...
But your project includes thinking
the 8052 Max RAM is 64K. If you need more than that you need external storage. You can Use Banking to increase it, but it adds a lot of complexity. Serial memory or SD Cards are better since you will not be time critical (see how a little info from you changes the answers you get) If you are looking for malloc(). It is there but you need to configure it. Also it is a very poor choice for a small embedded system.
please tell me what is data structer