if (noise_hash == NULL) {
noise_hash = (sim_noise_hash_t *)malloc(sizeof(sim_noise_hash_t));
memcpy((void *)(noise_hash->key), (void *)key, NOISE_HISTORY);
if (noise_hash == NULL) {
noise_hash = (sim_noise_hash_t *)malloc(sizeof(sim_noise_hash_t));
memcpy((void *)(noise_hash->key), (void *)key, NOISE_HISTORY);