Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8963883
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T16:27:27+00:00 2026-06-15T16:27:27+00:00

I want to know how to find the amount of memory that a function

  • 0

I want to know how to find the amount of memory that a function uses while it is used as an inline function and an ordinary function to make the function usage efficient.

I want to calculate the exact memory usage in both cases.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T16:27:29+00:00Added an answer on June 15, 2026 at 4:27 pm

    You need to clarify whether you’re concerned about program size or runtime memory usage (stack versus registers).

    Further, for any function that inherently has a fair bit of work to do for each call site, there’s insignificant benefit from inlining in terms of program size. For any function that inherently needs to use a significant amount of memory – for a ballpark feel figure say more than a hundred bytes – inlining or not won’t make any difference. But “inherently” encodes the fact that each call site may have different actual needs, so inlining may help if compile-time determination of needs of specific call sites allows significant optimisation opportunities (for example – dead code elimination).

    Inline functions are effectively substituted at each point they’re called, then optimised – that optimisation may change the registers and memory they use – whether you mean memory used for machine code instruction (i.e. the program), or memory used for stack versus registers. Optimisations such as dead code elimination – along with the memory usage implied by that code – may be possible for one caller but not another, but if that code branch wasn’t executed when calling an out-of-line function there’s unlikely to be much difference in the memory usage anyway. Countering this, depending on the size of the function, how much optimisation can typically happen after inlining, how many call sites there are, and how much code is needed to prepare and pass arguments when calling out-of-line, either approach may yield more or less overall code bloat. With inling there’s more risk of excessive code bloat, but then the compiler will typically choose not to honour an “inline” keyword hint when reasonable thresholds are exceeded.

    As with most optimisation options, if you care you should measure for your specific application with realistic data/event loads.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to know where I can find the original XML used for the
I know that in Jsoup when you want to find a certain Element with
I'd like to know the total amount of memory allocated while a method runs.
Hi i want to know how to find the distance between two markers in
I'm new to regex and just want to know if its possible to find
What I want to do is find a way to know what the coordinates
I dont know if it is asked (I couldn't find any). I want to
I want to build an application that can set up a set amount of
Most web frameworks let you know the amount of time that it took to
as I was not able to find a function which retrieves the amount of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.