Skip to content

Pre-allocate space for the display to stop memory fragmentation#41

Open
divereigh wants to merge 1 commit intofurbrain:mainfrom
divereigh:Fix-Memory-Fragmentation
Open

Pre-allocate space for the display to stop memory fragmentation#41
divereigh wants to merge 1 commit intofurbrain:mainfrom
divereigh:Fix-Memory-Fragmentation

Conversation

@divereigh
Copy link

I have found the SAP6 frequently crashes after a it has received a few errors with a memory allocation error. This is very irritating because invariably SexyTopo loses contact with the SAP6.

I let chatGPT loose on the problem and it said the issue is related to allocation of the display error messages, which then can end up fragmenting the memory. It suggested the attached fixes to essentially allocate the memory ahead of time.

It appears that now the display still includes the bluetooth and battery symbol even when displaying the big text, so I modified the error messages slightly so they don't look awful.

I can confirm this does seem to fix the crashing issue. But I am unsure if it creates any others.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant