Tag Info

New answers tagged

0

You could have a no-op destructor, something like void noop_destructor(void*) {}; then set the destructor of Uart perhaps using #define Uart_destructor noop_destructor (add the suitable cast if it is needed) Don't forget to document. Maybe you want even #define Uart_destructor abort Alternatively, special case in the common code calling ...


2

The easiest way I have found to detect memory leaks is to be able to cleanly exit your application. Many compilers/environments provide a way to check for memory that is still allocated when your application exits. If one isn't provided there's usually a way to add some code right before exiting which can figure it out. So, I would certainly provide ...


6

If you don't provide a way to dispose the object, you are passing a clear message that they have "infinite" lifetime once created. If this makes sense to your application, I say: do it. Glampert is right; there is no need for destructors here. They would just create code bloat and a pitfall for users (using an object after its destructor is called is ...


2

Embedded software is very different. On a desktop app, abstractions and libraries save you a lot of development time. You have the luxury of throwing another couple megabytes or gigabytes of RAM or some 2+GHz 64-bit CPU cores at a problem, and someone else (users) is paying for that hardware. You may not know what systems the app will run on. In an ...


0

The bios runs off of a rom, it initializes the dram, enumerates the pcie, and a number of other things. The bios then finds your or some program on the boot device, copies that to ram and runs it there. the basic answer is yes if you have 32mb and your program is 2mb then there is 30mb left for heap and stack. Virtual memory solutions first have to be ...


8

With the processors used for embedded devices, there are three possibilities: The processor executes the code directly from flash/ROM. In this case, the code doesn't take any RAM away from the system at all. In this setup, the RAM and flash/ROM are typically mapped to different portions of the address space that the processor can address, so the maximum ...


2

Does the binary go in ram? On most systems: yes. Though on many today systems there is an additional abstraction layer between the physical RAM and the RAM your processor "believes it has" - it is called virtual memory, as the other answer already pointed out. So if for example your machine has 32MB of physical RAM, but 64MB of virtual memory, as soon ...


0

Your program can get as big as the virtual memory on your system. To get a more specific answer, please give more specific information. Are you just interested? Struggling with an embedded system? Doing homework?


0

As a hiring manager for various companies whose core products include embedded system, I can say that I would simply not hire anyone who did not have a degree in either CS or EE from an accredited institution. The degree shows that the person is committed to a deep understanding of their field and will not simply blunder through problems. I have, on ...



Top 50 recent answers are included