Altera_Forum
Honored Contributor
15 years agoQ message allocation
This is just a general question about messaging and queues.
How are you guys allocating Q messages? For instance, each message I send is a pointer to a struct. My struct contains an ENUM value and a pointer. In all my message structure is 8 bytes. When I post to a Q, I send a pointer to one of these message structures. Should I be using the memory management functions every time and doing dynamic memory allocation of one of these message structures? I don't really know how else to do it without allocating a bunch of global msg structs at compile time. Any insight to this would be appreciated.