Click here to Skip to main content
15,796,456 members

Comments by honey the codewitch (Top 200 by date)

honey the codewitch 11-Nov-23 20:14pm View    
I solved it but I'm not sure how exactly so I don't know what to put for a solution!
honey the codewitch 11-Nov-23 17:13pm View    
its usb cdc serial. if there's a way to control handshaking on it, i wouldn't know. this same technique works for other projects.
honey the codewitch 9-Nov-23 9:15am View    
In that case it's not practical, because the user may need to select the heap to use at runtime, and will typically be using multiple heaps at the same time. Overloading new *could* get you that, if you made it call out to some switchable allocation scheme, but it's clumsier than using emplace new inside my libs
honey the codewitch 9-Nov-23 8:55am View    
In IoT and embedded you have different physical heaps with different sizes and performance characteristics. You have PSRAM and SRAM for example. Because of this, a user of my lib can choose the allocators to use when it needs to dynamically allocate RAM. Right now I've been very careful about RAII on anything that is the target of those allocations, but I'd rather use placement new and fire the constructors cleanly.
honey the codewitch 9-Nov-23 8:53am View    
+5 thanks. Wow, here I thought it was just a variant of the keyword new. I guess it's a function? Odd.