mirror of
https://github.com/lwvmobile/dsd-fme.git
synced 2026-11-21 05:05:38 -05:00
Event History: Move event_history_s from the stack to the heap; Calloc Plenty of Memory for it; #287
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
Reference in New Issue
Block a user