I'm programming in C in Visual Studio 2005. I have a multi-threaded program, but that's not especially important here.
How can I determine (approximately) how much stack space my threads use?
The technique I was planning to use is setting the stack memory to some predetermined value, say 0xDEADBEEF, running the program for a long time...
Basically, I'm looking for something where I can break execution and then see a visual representation of the stack in memory. DDD doesn't have this as far as I can tell.
...
I have an application that logs messages to the screen using a TextBox. The update function uses some Win32 functions to ensure that the box automatically scrolls to the end unless the user is viewing another line. Here is the update function:
private bool logToScreen = true;
// Constants for extern calls to various scrollbar functions...
Hi all
I am a first time poster. I have a problem that seems very common to a lot of people but I can't seem to find or decipher an answer anywhere.
The game I'm making has 3 rather large sprites on screen (230 high) x various widths.
Each sprite has 3 1024x1024 character sheets where the frames of animations are taken from.
I've ex...
What is your average php memory usage per request . I know lots of people will say that php memory usage depends on the application , but i just want to get general idea about your data.I just created simple php framework so i want to know that do i use needless memory or it is normal .
Actually , the interesting point is about my data...
We have a problem when loading a dynamic library multiple times (>200) on AIX. The page : http://www-01.ibm.com/support/docview.wss?uid=isg1IY93339 states a similar problem and the suggested solution is to "make the library sticky" to load it in memory a single time...But does the concept still exist on AIX 5.3 and above ? It does not se...
I am getting a strange result in the following C code.
int main()
{
int *p = (int *) malloc(100);
p[120] = 5;
printf("\n %d", p[120]);
}
Since I have allocated only 100 bytes, this code should give cause a segmentation fault. However, it prints '5' and does not give any runtime error. Can anyone please explain the reason?...
I have a (almost) perfectly working C++ code written with Boost.Python. It wraps a shared pointer based structure hierarchy of 3 or 4 classes, nothing terribly complex (i.e. class A has a std::vector of class B instance pointers, etc.), top level package called, say, foo.
Some time ago I decided to add visualization to the project using...
Hi chaps(and chappettes)
Have a regular C dll with an exported function
int GetGroovyName(int grooovyId,char * pGroovyName, int bufSize,)
Basically you pass it an ID (int), a char * buffer with memory pre-allocated and the size of the buffer passed in.
pGroovyName gets filled with some text. (i.e. its a lookup basied on the groovyID)...
What should be the preferred way by programmers:
1) Only Write:
SomeBoolean = True
2) Read but write only if necessary
If Not SomeBoolean Then SomeBoolean = True
...
I'm trying to find a way to limit the memory available for the Python VM, as the option "-Xmx" in the Java VM does. (The idea is to be able to play with the MemoryError exception)
I'm not sure this option exist but there may be a solution using a command of the OS to "isolate" a process and its memory.
Thank you.
...
Hello,
I'm aware that .NET doesn't use complete physical memory availabe. I've encountered a System.OutOfMemoryException while the physical memory usage as only 79%. I've run my system until 92% of physical memory usage.
You can see screenshot here:
http://a.imagehost.org/0655/CaptureOOM.gif
How do I tell .NET to use more memory?
I...
There is chance were a heavy weight application that needs to be launched in a low configuration system.. (Especially when the system has too less memory)
Also when we have already opened lot of application in the system & we keep on trying opening new new application what would happen?
I have only seen applications taking time to proce...
Hi guys, I have a very strange memory leak problem, it seems that sqlite3_step is doing some nasty stuff :|
I spent almost 4 hours trying to fix this but no luck till now :(
Here it is the code:
[dbList removeAllObjects];
sqlite3_stmt *statement = nil;
const char *sql = "SELECT * FROM dbs ORDER by rowOrder;";
if (sqlite3_prepare_v2(d...
I have a design question on how to design parsing a large excel file say 1000 x 100 Rows, and about 10 tabs.
Each Tab having a set of records with primary key as the first col. but these could be repeted in different tabs and each does not have the same set of primary keys.
Read a single primary key and form a java object with all the...
I have the need to continuously build large strings in a loop and save them to database wich currently occasioanlly yields an OutOfMemoryException.
What is basically going on here is I create a string using XmlWriter with StringBuilder based on some data. Then I call a method from an external library that converts this xml string to so...
How is a program (e.g. C or C++) arranged in computer memory? I kind of know a little about segments, variables etc, but basically I have no solid understanding of the entire structure.
Since the in-memory structure may differ, let's assume a C++ console application on Windows.
Some pointers to what I'm after specifically:
Outline of...
Hi all,
A simple question really, but one where I cannot find any anwsers too.
When I execute an Asynchronous Socket operation, such as :
socket.BeginSend
(
new byte[]{6}, // byte[] | buffer
0, // int | data to send buffer offset
1, // in...
Taking my first course in assembly language, I am frustrated with cryptic error messages during debugging... I acknowledge that the following information will not be enough to find the cause of the problem (given my limited understanding of the assembly language, ColdFire(MCF5307, M68K family)), but I will gladly take any advice.
......
If two threads try to write to the same address at the same time, is the value after the concurrent write guaranteed to be one of the values that the threads tried to write? or is it possible to get a combination of the bits?
Also, is it possible for another thread to read the memory address while the bits are in an unstable state?
I ...