473,326 Members | 2,182 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,326 software developers and data experts.

C++ memory usage in embedded system

Dear All:

Do you know how to analysis C++ memory usage in embedded system ? I want to know how many heap need for C++ objects creation in the system?
I use arm c++ library.
Oct 10 '07 #1
1 1842
Banfa
9,065 Expert Mod 8TB
As suggested in another thread you could try implementing your own new and delete operators to keep a record of memory allocated.

Unfortunately this will not include any memory allocated malloc (either people erroneously using it in C++ or in a mix language C and C++ project the C sections of the code may use it).


A common method that catches all heap allocations is to initialise all locations in the heap (and stack and any other area of memory you want to keep track of) to a known value, then at anytime you want you can examine the heap and work out what the peak usage was so far by seeing how much of the heap is still set to the initialisation value.

1 possible problem with this method is if you do not choose your initialisation value carefully you may get the situation where the allocated data was set to the initialisation value while it was being used thus resulting in a false result from the calculation. You can reduce the likelyhood of this by initialisaing odd and even memory locations on the heap to different values.
Oct 10 '07 #2

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

Similar topics

4
by: lebo | last post by:
Hi I'm trying to understand how Python handles memory usage and dynamic object loading and unloading. Problem to solve? Build a very low memory footprint (non-GUI) Python application for...
3
by: Ian Taite | last post by:
Hello, I'm exploring why one of my C# .NET apps has "high" memory usage, and whether I can reduce the memory usage. I have an app that wakes up and processes text files into a database...
9
by: Jimmy Cerra | last post by:
I am a little confused how the memory for objects is allocated in JavaScript. David Flanagan, in "JavaScript: The Definitive Guide," states that each property of a class takes up memory space when...
5
by: Ish Ahluwalia | last post by:
Hi: Can anyone provide a rough guesstimate on how much memory does fully conigured, with all the services turned on pgSql database require? I'm trying to make an estimate on how much memory...
12
by: ira2402 | last post by:
Hi All, We are developing sw for a small embedded OS and we have limited memory. We are looking for algorithms, links, and articles about this. The goal is efficient utilization of small amount...
7
by: Matthias Kwiedor | last post by:
Hi@all! I have a app (c#) where i load up a external dll (managed code from c#) with a small arraylist and hashtable in two routines (about 40000 objects in each arraylist and hashtable). If...
21
by: matvdl | last post by:
I have a system that was originally developed in asp - the pages are saved in SQL (there are over 10,000 pages) and saved to a temp directory in the server when requested by a client. I have...
29
by: tele-commuter | last post by:
Hi folks, I want to understand how exactly is an image(compiled c code and loaded into memory) stored in memory. What exactly is a linker script? I work with a lot of c code on a daily...
1
by: Tim Redfern | last post by:
Hi I'm having an issue that is probably obvious to somebody here but its baffling me.. I'm using python (2.5.1) on an embedded linux sytem system (kernel 2.6.19 I think) with only 32MB memory...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.