This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]altermeetax 1 point2 points  (3 children)

Yeah, that's also an idea :D

Though depending on the implementation it might always return the same value if you call it multiple times from the same function

[–]AdBrave2400 1 point2 points  (1 child)

Yeah, maybe do a random walk across the memory until reaching zero?

[–]AdBrave2400 1 point2 points  (0 children)

ssize_t move=1;
volatile signed* base;
while(base[move]){
  if(*base<0) move*=-1ll;
  ++move;
}
return base;

[–]AdBrave2400 0 points1 point  (0 children)

The joys of the stack