Check if all 256 pointers are empty or full ?

skybuck2000 <[email protected]> Fri, 29 Oct 2021 02:24:47 -0700 (PDT)
Newsgroups alt.comp.lang.borland-delphi
Message-ID <[email protected]>
Woops, checking if all 256 bits are empty or full is only one part of it hihihihi.

Now I need a way to check if all 256 pointers are empty or full if I want to achieve the same efficiency savings and alignment for the rest of the data structures ;)

A pointer can either be 4 bytes or 8 bytes depending on the compiler settings, 32 bits or 64 bits.

So here is where code gets a bit more tricky, and here is where AVX-512 or something might actually help a lot for more advanced computers.

I am all ears and give me your best shot at this ! ;)

In this case a empty pointer can be considered some arbitrary value like 1
In this case a full pointer can be considered some arbitrary value like 2

Or at least values which are not used by virtual memory managers.

The lower 64K range might be safe in windows.

In another technique could be to assign global pointers there own address to take out this address range from the compiler so it cannot allocate it to anything else, example:

var
  const_empty : pointer;
  const_full : pointer;

begin
  	const_empty := @const_empty;
	const_full := @const_full;
end;

So this is where the real AVX-512 or whatever challenge might begin ! ;)

a special data structure could also be created which contains these pointers setup for easier checking for example:

64 bitters:
AllFull[0] := const_full;
AllFull[1] := const_full;
AllFull[2] := const_full;
AllFull[3] := const_full;

AllEmpty[0] := const_empty;
AllEmpty[1] := const_empty;
AllEmpty[2] := const_empty;
AllEmpty[3] := const_empty;

So basically this is like checking for nil or null but different, with a special meaning so the code can make sense of the data structure if it was supposed to contain full or empty data structures but now instead it contains only a pointer indicating what it was ;) So now you get a bit of an idea of what this "secret" data structure was capable of ! LOL.

Bye,
  Skybuck =D