Event History: Move event_history_s from the stack to the heap; Calloc Plenty of Memory for it; #287

This commit is contained in:
lwvmobile
2025-04-23 16:27:25 -04:00
parent 8cbfb96141
commit 71d4d30f3a
2 changed files with 3614 additions and 3611 deletions

View File

@@ -731,7 +731,7 @@ typedef struct
dPMRVoiceFS2Frame_t dPMRVoiceFS2Frame; dPMRVoiceFS2Frame_t dPMRVoiceFS2Frame;
//event history itemized per slot //event history itemized per slot
Event_History_I event_history_s[2]; Event_History_I * event_history_s;
//new audio filter structs //new audio filter structs
LPFilter RCFilter; LPFilter RCFilter;

View File

@@ -1321,6 +1321,8 @@ initState (dsd_state * state)
state->dmr_color_code = 16; state->dmr_color_code = 16;
state->event_history_s = calloc(1, 10000000000); //TODO: tweak this size later on
//initialize event history items (0 to 255) //initialize event history items (0 to 255)
for (uint8_t i = 0; i < 2; i++) for (uint8_t i = 0; i < 2; i++)
init_event_history(&state->event_history_s[i], 0, 255); init_event_history(&state->event_history_s[i], 0, 255);
@@ -3625,3 +3627,4 @@ main (int argc, char **argv)
} }
//Tag: 2025 //Tag: 2025