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.

[SOLVED] effect of Functions name on memory

Status
Not open for further replies.

Sudhp

Member level 4
Member level 4
Joined
Oct 11, 2013
Messages
69
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Location
India
Visit site
Activity points
528
hii...
I wanna know ...
Is function name effect on memory of micro......
I mean if I have to print a string on lcd and I named the function as...
1. void print(char string[])
2. void print_string_to_display_on_lcd(char string[])
then either both will take same memory of Rom or different memory....
I am only talking about memory taken by function name.....
 

Afaik, the function name is not saved when the code is compiled, so both will use the same amount of space in ROM.
 
  • Like
Reactions: Sudhp

    Sudhp

    Points: 2
    Helpful Answer Positive Rating
First know the memory allocation map

SSSSSSSSS.JPG


so every thing matters in memory
 

Depends a lot on your compiler and how you configure your project.
You can usually choose to compile with symbols (bigger program) which you do while debugging
and then strip symbols when compiling for distribution resulting in smaller code.

If you cant debug because of memory shortage you can often compile sections of your
code - test/debug them individually then compile with stripped symbols when it all works.
Just be careful the sections you create dont interact and create bugs - and test thoroughly after.
There are different ways to do this depending on your compiler/environment.
Depending on what you are doing it can often be easier to just use a device with more memory to start with.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top