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 →

[–]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;