473,379 Members | 1,235 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

macro size

39
Hi.Does a macro increase the size of the executable ?On which factors the size of a executable depends?

Jerico
Oct 21 '06 #1
4 2189
Banfa
9,065 Expert Mod 8TB
A macro per-sa does not because all a macro does is implement a text substitution in the C/C++ preprocessor.

However the result of that text subsitution may be the insertion of some code and any code insertion will increase the exectables size.
Oct 21 '06 #2
jerico
39
Thanks Banfa.But I would also like to know the things that affect the size of the executable.

Jerico
Oct 23 '06 #3
Banfa
9,065 Expert Mod 8TB
The amount of code (not to surprisingly), the number of different library functions called, the amount of initialised data and data constants are the main things affecting executable size.
Oct 23 '06 #4
jerico
39
Thanks Banfa.

Jerico
Oct 24 '06 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

25
by: Andrew Dalke | last post by:
Here's a proposed Q&A for the FAQ based on a couple recent threads. Appropriate comments appreciated X.Y: Why doesn't Python have macros like in Lisp or Scheme? Before answering that, a...
7
by: Newbie_sw2003 | last post by:
Where should I use them? I am giving you my understandings. Please correct me if I am wrong: MACRO: e.g.:#define ref-name 99 The code is substituted by the MACRO ref-name. So no overhead....
7
by: Jim Cook | last post by:
We have a macro which takes various index constants as an argument and offsets into an array. The macro can be an Lvalue or Rvalue. The index is not zero based. I would like a compile time error...
1
by: Capstar | last post by:
Hi NG, I have the following struct, macro and functions prototypes: typedef struct { jmp_buf __env; /*other stuff*/ } SAT; #define smalloc_init(sat_p, size) \
14
by: Michael B Allen | last post by:
I just noticed that doing something like the following may fail because it can overwrite u->size before it's evaluated. memcpy(u, buf, u->size); Is it legit that this is a macro as opposed to...
7
by: Peter Ammon | last post by:
K.N. King's book "C Programming: A Modern Approach" gives this exercise in chapter 14, which is about the preprocessor: The following macro has a subtle problem: #define ABS(a)...
17
by: Russell Shaw | last post by:
Hi, How do i make an if/then/else macro act as a function so that the whole thing looks like the return value? I tried this lame attempt for starters: #define A_FROM_B(b) \ ( \ if(b < 10)...
2
by: leo.hou | last post by:
Hi experts, I am new to linux and all the type definitions are driving me mad. What is the best way to check a type definition in linux? When I use man page to check some function definition, I...
4
by: dis_is_eagle | last post by:
HI.In what circumstances we should use a macro and when we should use a function? If we use macro then will the size of the executable increase?Thanks for help. Eric
2
by: JeanDean | last post by:
For some debugging purpose I want to use overloaded new instead of existing MyAlloc() in a huge code base. But below macro doesnt work. Is there any way to pass "size" to overloaded new ? ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.