Re: ??:Re: Meeting trouble when modifying LRU algorithm.

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Wed, 10 Apr 2002 08:01:34 +0200

Just add it somewhere before the final "Uknown...".

You also need to declare a prototype in the .h file.

Regards
Henrik

On Wednesday 10 April 2002 05:06, maer727@sohu.com wrote:
> Thanks, Henrik pal!
>
> Thanks for your suggestions. It is very useful.
>
> Such are the codes taken from store_repl_heap.c:
> createRemovalPolicy_heap
>
> ///////////////////////////////////////////////////////////////////
>///// if (!strcmp(keytype, "GDSF"))
> heap_data->keyfunc = HeapKeyGen_StoreEntry_GDSF;
> else if (!strcmp(keytype, "LFUDA"))
> heap_data->keyfunc = HeapKeyGen_StoreEntry_LFUDA;
> else if (!strcmp(keytype, "LRU"))
> heap_data->keyfunc = HeapKeyGen_StoreEntry_LRU;
> else {
> debug(81, 0) ("createRemovalPolicy_heap: Unknown key type \"%s\".
> Using LRU\n", keytype);
> heap_data->keyfunc = HeapKeyGen_StoreEntry_LRU;
> }
> ///////////////////////////////////////////////////////////////////
>//////// If I have developed a algorithm called George_LRU, :-),
> where should I add the "keytype"? ( like GSDF, LRU, LFUDA, here I
> want to add George_LRU).
>
> Best regards,
> George, Ma
Received on Wed Apr 10 2002 - 00:19:16 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:15:00 MST