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 7025279
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:57:11+00:00 2026-05-27T23:57:11+00:00

Basically I am interested to know how far you go, to ensure your users

  • 0

Basically I am interested to know how far you go, to ensure your users get the best application.

  1. Which one to prefer dynamic/static memory allocation, when both are possible.
  2. Scraping int and using short or int8_t. Will it really help? Or it would be more of a headache?
  3. Allocating a “proportionally” large amount of memory dynamically (due to lack of info on actual memory required). And then reallocating it to smaller memory (compact) and deleting the former. Eg. I allocate 1000 units of memory. Then after calculating, I determine that only 400 units are required. So I allocate new 400 units, copy the 400 items and then delete 1000 units. In this process i end up allocating even more memory i.e 1400 units at some time. So should I actually take pains to allocate new 400 units and let 600 units waste? [main question]
  4. Any effective use of union to help lower memory usage?

I am sure there are more important points missing. Any other known or indigenous way to increase memory and time performance are welcome.

  • 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-05-27T23:57:12+00:00Added an answer on May 27, 2026 at 11:57 pm

    2. Static. Don't allocate memory when you don't need to.

    3. If the system is a 32-bit system, then the actual instructions to the processor will actually prefer uint32_t or int32_t...

    5. If I need a generic data type that would need to be allocated several times in a loop, then a union can come in handy... to avoid allocating memory.

    6. From my experience, allocating memory can be a slow process if it is done in a loop... You will see a performance increase if you allocate all the memory ahead of time, and then use it from a pool. When the system has go find huge blocks of memory, it can be a bottleneck.

    7. In real-time situations with large chunks of memory... yes... otherwise... eh... not really

    Hope this helps… If you follow this style, you will notice improved performance.

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

Sidebar

Related Questions

I know static is an overloaded keyword in C. Here, I'm only interested in
I am interested in using CUDA to program a multi-GPU application. As far as
The title sums it up but basically I was interested to know if it
Basically I am developing an app which can show both the users' current location
Basically I want to know how to set center alignment for a cell using
I am interested to know the performance impacts of using MySQL as a key-value
I working on an application for processing document images (mainly invoices) and basically, I'd
My issue is basically the the same as this one . I have a
I recently had a couple of flash products to do, which basically were a
I'm interested to know how I could improve the performance of SQL Server when

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.