static-memory-allocation Questions

13

Solved

I have to do an assignment for my class and it says not to use Static arrays, only Dynamic arrays. I've looked in the book and online, but I don't seem to understand. I thought Static was created a...

7

Solved

I stumbled upon a quiz that involved array declaration with different sizes. The first thing that came to my mind is that I would need to use dynamic allocation with the new command, like this: wh...
Electrothermics asked 20/1, 2020 at 10:2

3

Solved

I'm currently in the process of building an embedded system, using an ARM Cortex M3 processor, with 64 KB of SRAM. At the moment, I'm looking for a way to ensure deterministic performance with STL ...

2

Solved

I was reading about dynamic memory allocation and static memory allocation and found the following about dynamic memory allocation: In the programs seen in previous chapters, all memory ne...
Diffusivity asked 13/12, 2018 at 10:50

3

Solved

I researched a lot of static and dynamic memory allocation but still, there is a confusion that: int n, i, j; printf("Please enter the number of elements you want to enter:\t"); scanf("%d", &n...

7

Solved

I would like to know what is the difference between static memory allocation and dynamic memory allocation? Could you explain this with any example?

4

Consider the following C code: #include <stdio.h> #include <stdlib.h> int main() { int arrSize; scanf("%d", &arrSize); printf("%d\n",arrSize); in...
Ephemera asked 2/1, 2017 at 7:52

3

Solved

I have heard in embedded system, we should use some preallocated fixed-size memory chunks(like buddy memory system?). Could somebody give me a detailed explanation why? Thanks,

2

Solved

I am a little confused on whether I should prefer to initialize my main widgets on the stack or on the heap. In "C++ GUI Programming with QT 4," main widgets are initialized on the stack. Before I ...
Evelyn asked 31/12, 2011 at 15:36
1

© 2022 - 2024 — McMap. All rights reserved.