From: Amon Ott <ao@rsbac.org>
Subject: Re: Lists
Date: Tue, 20 Feb 2001 15:29:40 +0100
Next Article (by Date): Re: Lists Jörgen Sigvardsson
Previous Article (by Date): Re: Lists Jörgen Sigvardsson
Top of Thread: Lists Jörgen Sigvardsson
Next in Thread: Re: Lists Jörgen Sigvardsson
Articles sorted by: [Date]
[Author]
[Subject]
On Die, 20 Feb 2001 Jörgen Sigvardsson wrote: > If however you make the id on the following form: (int id_length, void* id) > then the id could be anything from integers to strings to structures. Now > that would be really neat. No problem here. However, the whole key length will be used. If part of the key is a union, it should be blanked before assigning values. > But now that we're talking a keyed data structure, > a list could be a performance bottle neck - perhaps an AVL-tree or red-black > tree would be in order? In the beginning the REG lists should be rather simple. Later we can still add hash functions, trees, ordering or whatever - as long as the interface does not change, nobody will care. How many items do you expect to store? I'd say, up to 100 or 200 per list, performance is good enough. Also, the use of default values helps to keep the lists smaller (like the General ACI). Maybe another ds function 'remove-all-data-with-values-xyz'. > Also when it comes to serialization to disk, I would like some sort of custom > callback that performs the actual I/O. Perhaps a callback on the form: > > int callback(file* f, void* data, u_long curoffset, u_long* data_written) > > Where the f is the opened ACI-file, curoffset is the file pointer (if I can > remember correctly, "kernel files" don't manage a file pointer). When the > callback is finished, it updates the *data_written with how many bytes was > actually written to disk. if any errors occur, an -Exxx code is returned or 0 > for success. Persistent data will have to be treated in the next REG cycle. And the ds mentioned above are meant for rather simple needs - you can still use your own ds with all optimizations. Amon. - To unsubscribe from the rsbac list, send a mail to majordomo@rsbac.org with unsubscribe rsbac as single line in the body.
Next Article (by Date): Re: Lists Jörgen Sigvardsson
Previous Article (by Date): Re: Lists Jörgen Sigvardsson
Top of Thread: Lists Jörgen Sigvardsson
Next in Thread: Re: Lists Jörgen Sigvardsson
Articles sorted by: [Date]
[Author]
[Subject]