Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Structure padding in keil IDE

Newbie level 1
Joined
Jul 11, 2023
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
0
Activity points
9
Hi All,

I'm using Keil IDE. I observed that the compiler taking extra mamory spaces for bool and char variable.
Is there any setting in the IDE to disable this?
Below workaround is not working:
1) #pragma pack(1)
2) __attribute__((packed))
3) And it's very difficult to alignment the membors of structue. Bcz This strucure has many nested strcture and enums.

Any solution of above issue?
 
In the Keil IDE, structure padding is akin to tidying up a room with different-sized toys. Picture the computer's memory as this room where data, like toys, needs its designated space. Much like a structural-consultancy plans the layout of a building, Keil IDE strategically arranges various types of data in the computer's memory. To ensure a neat and organized arrangement, Keil IDE may introduce a bit of extra space, known as padding, between different data elements. It's like providing individual rooms for different-sized toy blocks, ensuring each type of data has its own spot, even if it means adding a little extra space to maintain order. So, structure padding acts as a digital organizer, making sure the computer can quickly locate and manage information efficiently, much like how a structural consultant plans and organizes spaces in construction blueprints.
 

LaTeX Commands Quick-Menu:

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top