Click here to Skip to main content
15,887,379 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Wordle 463 Pin
StarNamer@work24-Sep-22 16:04
professionalStarNamer@work24-Sep-22 16:04 
GeneralRe: Wordle 463 Pin
OriginalGriff24-Sep-22 18:09
mveOriginalGriff24-Sep-22 18:09 
GeneralRe: Wordle 463 Pin
pkfox24-Sep-22 22:07
professionalpkfox24-Sep-22 22:07 
GeneralRe: Wordle 463 Pin
Sandeep Mewara24-Sep-22 22:46
mveSandeep Mewara24-Sep-22 22:46 
GeneralRe: Wordle 463 Pin
jmaida25-Sep-22 9:04
jmaida25-Sep-22 9:04 
General"Use C!" they said. "It will be fun!", they said Pin
honey the codewitch24-Sep-22 5:42
mvahoney the codewitch24-Sep-22 5:42 
GeneralRe: "Use C!" they said. "It will be fun!", they said Pin
RickZeeland24-Sep-22 7:13
mveRickZeeland24-Sep-22 7:13 
GeneralRe: "Use C!" they said. "It will be fun!", they said Pin
Greg Utas24-Sep-22 7:24
professionalGreg Utas24-Sep-22 7:24 
A couple of simple least recently accessed mechanisms that I can think of are
  • A global integer that increments on every access and is written against the item accessed. When space is needed, free the item(s) with the lowest access values. Low overhead for accesses but could be expensive when freeing space, especially if there are a fair number of items or space often needs to be freed. Also needs to handle the access counter wrapping around.
  • A two-way queue. When an item is accessed, exqueue it and put it at the front of the queue. When space is needed, free the item(s) at the end of the queue. More expensive for accesses but faster at freeing space.
I've got a sense that I don't understand your constraints, because you've probably ruled these approaches out for some reason.
Robust Services Core | Software Techniques for Lemmings | Articles
The fox knows many things, but the hedgehog knows one big thing.

GeneralRe: "Use C!" they said. "It will be fun!", they said Pin
honey the codewitch24-Sep-22 9:03
mvahoney the codewitch24-Sep-22 9:03 
JokeRe: "Use C!" they said. "It will be fun!", they said Pin
Randor 24-Sep-22 12:48
professional Randor 24-Sep-22 12:48 
GeneralRe: "Use C!" they said. "It will be fun!", they said Pin
Eddy Vluggen24-Sep-22 9:20
professionalEddy Vluggen24-Sep-22 9:20 
GeneralRe: "Use C!" they said. "It will be fun!", they said Pin
Daniel Pfeffer24-Sep-22 10:44
professionalDaniel Pfeffer24-Sep-22 10:44 
GeneralRe: "Use C!" they said. "It will be fun!", they said Pin
honey the codewitch24-Sep-22 10:46
mvahoney the codewitch24-Sep-22 10:46 
GeneralRe: "Use C!" they said. "It will be fun!", they said Pin
Daniel Pfeffer24-Sep-22 13:38
professionalDaniel Pfeffer24-Sep-22 13:38 
GeneralRe: "Use C!" they said. "It will be fun!", they said Pin
honey the codewitch24-Sep-22 15:10
mvahoney the codewitch24-Sep-22 15:10 
GeneralRe: "Use C!" they said. "It will be fun!", they said Pin
Randor 24-Sep-22 15:33
professional Randor 24-Sep-22 15:33 
GeneralRe: "Use C!" they said. "It will be fun!", they said Pin
honey the codewitch24-Sep-22 15:51
mvahoney the codewitch24-Sep-22 15:51 
GeneralRe: "Use C!" they said. "It will be fun!", they said Pin
Randor 24-Sep-22 16:44
professional Randor 24-Sep-22 16:44 
GeneralRe: "Use C!" they said. "It will be fun!", they said Pin
honey the codewitch24-Sep-22 16:46
mvahoney the codewitch24-Sep-22 16:46 
GeneralRe: "Use C!" they said. "It will be fun!", they said Pin
Randor 24-Sep-22 17:15
professional Randor 24-Sep-22 17:15 
GeneralRe: "Use C!" they said. "It will be fun!", they said Pin
honey the codewitch24-Sep-22 17:34
mvahoney the codewitch24-Sep-22 17:34 
PraiseRe: "Use C!" they said. "It will be fun!", they said Pin
Randor 24-Sep-22 17:44
professional Randor 24-Sep-22 17:44 
GeneralRe: "Use C!" they said. "It will be fun!", they said Pin
honey the codewitch24-Sep-22 17:58
mvahoney the codewitch24-Sep-22 17:58 
GeneralRe: "Use C!" they said. "It will be fun!", they said Pin
jmaida24-Sep-22 11:08
jmaida24-Sep-22 11:08 
GeneralRe: "Use C!" they said. "It will be fun!", they said Pin
englebart26-Sep-22 14:39
professionalenglebart26-Sep-22 14:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.