What methods are available for determining the optimum stack size for embedded/memory constrained system? If it's too big then memory is wasted that could be used elsewhere. However, if it is too small then we get this website's namesake...
To try to jump start things: Jack Ganssle states in The Art of Designing Embedded Systems that, "...
I'm still trying to debug a very sneaky memory corruption problem. I came across a section of my code that allocates memory on one thread and deletes it on another.
I have a vague feeling that this is wrong, but I'm not sure why. The threads share the process memory and access to these structures is protected by a mutex, so I think ever...
Hmmm. Is there a primer anywhere on memory usage in Java? I would have thought Sun or IBM would have had a good article on the subject but I can't find anything that looks really solid. I'm interested in knowing two things:
at runtime, figuring out how much memory the classes in my package are using at a given time
at design time, esti...
I'm writing a C++ program (compiled with gcc and running on RedHat Linux). The program needs to know at runtime how much space is left on the stack and how much is left in the heap. I realize there may not be a definite answer to this question (about the heap), so alternatively, I could use the amount of memory already allocated from t...
As a Christmas gift I have written a small program in Java to calculate primes. My intention was to leave it on all night, calculating the next prime and writing it to a .txt file. In the morning I would kill the program and take the .txt file to my friend for Christmas.
Is there anything I should be worried about? Bear in mind that thi...
I need to pull large Unicode textual strings (e.g. 200Mb) from a Database (nvarchar) and store in memory for processing. i.e. I need random access to all parts of the strings.
Looking at this from strictly memory centric point of view, what are the pro’s and con’s of using a System.IO.MemoryStream versus a System.String as my in memory ...
How can I determine what memory is accessible by a process, other than calling ReadProcessMemory() on every single byte/page/whatever to see if it wins or fails?
(I know it must be possible as several tools show this sort of information, e.g. IDA Pro debugger, WinHex, Sysinternals' Process Monitor, ...)
...
I was having a conversation with a co-worker and the subject of null came up. He was telling me that in .NET behind the scenes it is just a really small number. I always thought that the object just didn't have a pointer to any memory on the heap but i wasn't sure either way.
So i'm hoping the community can clear it up for us ;P
...
There are many debugging option available, but it says you need to compile Perl with
-DDEBUGGER option. How do we do that on Windows with ActivePerl.
Also, I had this problem of out of memory with Perl. I was reading a XML file with 5 lines but the second line was way way too big, (the file size was 4.3Mb) for 5 lines.
It does not pars...
I'm trying to run down a memory leak in a windows forms application. I'm looking now at a form which contains several embedded forms. What worries me is that the child forms, in their constructor, take a reference to the parent form, and keep it in a private member field. So it seems to me that come garbage-collection time:
Parent ha...
How are objects stored in memory in C++?
For a regular class such as
class Object
{
public:
int i1;
int i2;
char i3;
int i4;
private:
};
Using a pointer of Object as an array can be used to access i1 as follows?
((Object*)&myObject)[0] === i1?
Other questions on SO seem to suggest that casting a struct to ...
Hiya,
I've heard a lot of people talk of a tool called Memory Monitor as a better way to examine the memory usage of an iPhone app as Object Alloc doesn't give an accurate picture of how much memory an app is actually using.
How can I launch Memory Monitor? I can't find it in instruments. Is it a part of a separate tool I have to downl...
I'm experiencing some issues regarding my javabuilder-compiled matlab-code. My application is basically split up like this:
GUI: Java
Calculations: Matlab
The main problem is that when compiling my matlab-code with the javabuilder in Matlab (R17, 2007a), I have less memory available than I have when I compile the same code to an exe-...
The problem I'm running into is that as far as I know the delete operator should be a static function but sometimes the compiler (VC++) seems to be treating it as dynamic.
Given:
class Base
{
public:
void* operator new(size_t size) { /* allocate from custom heap */ }
void operator delete(void *p) { customFree(p, sizeof(Base)); }...
I like the memory scanner you can get from crucial (http://www.crucial.com/systemscanner/index.aspx) however it only works with an online computer.
I would like to be able to do as much as possible of what it does, but off-line.
I would like to produce sufficient info to be able to take this info to another online computer and use that...
There are plenty of script/tools for counting line of code, and some to count functions size in terms of line of code.
But here I'm looking to a way to measure function size in terms of bytes of generated code.
Does anyone know a way/tools to extract this information from a .lib or a .dll?
For example, I know how to list function name...
I am trying to get reliable information on when my C# application (Windows XP) will run out of memory. I did some research and tests on my machine and picked the most reliable perfmon counters:
Memory.Pages Output/sec
Memory.Available Bytes
I use thresholds and AND operator and it works quite well, but on the client machine (also Wind...
Hi
I am looking for a tool which let me explore process' memory allocation on Windows e.g.
Starting address of the process
Allocated memory segments, there addresses
Stack and Heap addresses and current stack pointer
Objects on Heap and there addresses
Referenced libraries
I have used Process Explorer but it talks about total usage not s...
With SQL Express (either 2005 or 2008 edition) there is a limit of 1GB memory and 1 CPU that can be used. What I'm wondering, is if two instances are installed on the same machine, would they use the same CPU and same 1GB of memory? Or, would they use potentially two different CPU's and 2GB memory?
...
How can I reduce resources inside my application?
I have tried a number of tricks
I have reduce and rewritten code, reduce line number,
Reduce comments,
Compressed the final EXE, but this is not the way I want to go,
Improve the variable type cast,
Remove ICONs,BMP,JPG, from inside the application
I need my applications to be as small as...