Skip to content
Discussion options

You must be logged in to vote

My first thought is that the other incoming messages would cause increased memory fragmentation, even though you ignore them. Just how fragmented the memory becomes would depend on the rate and pattern of message sizes you receive. If the memory becomes sufficiently fragmented, you will be unable to allocate larger blocks of memory.

PS. Apologies in advance for some other unsolicited advice:

  • though not relevant to this particular problem, I think you should be using client.wait_msg(), not client.check_msg() in update() - if I am reading your logic correctly.
  • explicitly close the CACHE_FILE in on_message_cb() when you open it for reading
  • save memory (and memory fragmentation) by just writ…

Replies: 2 comments 11 replies

Comment options

You must be logged in to vote
10 replies
@robert-hh
Comment options

@Redsandro
Comment options

@glenn20
Comment options

@glenn20
Comment options

@glenn20
Comment options

Answer selected by Redsandro
Comment options

Josverl
Feb 6, 2024
Collaborator Sponsor

You must be logged in to vote
1 reply
@Redsandro
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants