I've developed a small application in C# (.net 3.5) which runs in the system tray. Basically it just checks a rss-feed every 5 minutes, and if there's a new feed since the last time it checked, it displays a balloontip, and also uses the text-to-speech engine in .net 3.0/3.5 to read the headline of the fetched feed.
It works fine, but I...
I asked a question earlier on defining a structure using malloc.
This was the answer I was given by the majority:
struct retValue* st = malloc(sizeof(*st));
I was showing a friend my code, and we came to a stumbling block.
Could someone please explain why this code works?
From my viewpoint, *st hasn't been defined when you malloc it,...
here is code
- (void)applicationDidFinishLaunching:(UIApplication *)application {
NSBundle *bundle = [NSBundle mainBundle];
NSString *moviePath = [bundle pathForResource:@"sample_mpeg4" ofType:@"mp4"];
NSURL *movieURL = [[NSURL fileURLWithPath:moviePath] retain];
MPMoviePlayerController *moviePlayer = [[MPMoviePlayerController al...
I'm running a software called Fishbowl inventory and it is running on a firebird database (Windows server 2003) at this time the fishbowl software is running extremely slow when more then one user accesses the software. I'm thinking I maybe able to speed up the application by forcing the database to run "In Memory". However I can not fin...
Assuming the interpreter for the language (Can be anything from PHP to Ruby) is written in C.
How are variables (or more complex data structures not only containg name and value), which are defined by the script that is currently being executed, stored and read out?
I, with my rather poor knowledge of C, would end up with the conclusion...
I am writing a custom file system crawler, which gets passed millions of globs to process through sys.stdin. I'm finding that when running the script, its memory usage increases massively over time and the whole thing crawls practically to a halt. I've written a minimal case below which shows the problem. Am I doing something wrong, or h...
Hi,
I am suffering from an "Out of memory" exception in my Windows Service after running it for few hours under huge workload.
I used the following performance counters to detect memory leaks:
# bytes in all heap
Private bytes
Virtual bytes
The first 2 counters are going up and down regularly ... I cant see anything wrong in them.
bu...
I have an application that uses a 3rd party component. This component references a particular dll, say X.
My application is installed on 2 different machines, say A and B.
A has 5 X.dll in the Winsxs folder, differing in their minor versions.
B has 3 X.dll in the Winsxs folder, again differing in their minor versions.
My application run...
I'm writing a C++ custom allocator for use with STL. When I put the following code in the class definition, it compiles:
#include "MyAlloc.hpp"
#if 1
template <typename T>
typename MyAlloc<T>::pointer
MyAlloc<T>::allocate(size_type n, MyAlloc<void>::const_pointer p) {
void *ptr = getMemory(n*sizeof(T));
typename MyAlloc<T>::pointe...
Hi I am testing a .NET website with Trace Enabled and everything seems normal, to me, except one thing:
Category Message From First(s) From Last(s)
aspx.page End Load 4,69992678581181 4,699362
This seems like an extraordinarily large number for 'End Load'.
I am clueless as to how to use a Trace result correctly, ...
Hi,
I am testing a particular use case for leaks. Sometimes, I get the leaks and other times I don't even if I go through the same usecase. Can you suggest whether it is because of the system frameworks or my code?
I have checked in my code and everthing looks perfect without any unreleased objects. Can you suggest a solution?
Thanks
...
We have a .NET service using ~30MB of memory at startup. (VM ~= Mem usage)
I wanted to dump the process and find out what is holding those 30MB.
The CDB debugger generating the mini-dump increased mem usage by 100MB.
From the dump I could see those 100MB were image memory (DLLs)
-------------------- Usage SUMMARY ---------------------...
Is there a function in PHP (or a PHP extension) to find out how much memory a given variable uses? sizeof just tells me the number of elements/properties.
EDIT: memory_get_usage helps in that it gives me the memory size used by the whole script. Is there a way to do this for a single variable?
...
Hi.
I was looking through the web for a way to dynamically allocate space for 3d matrix, say of int type.
And i found many sites concerning 2d matrices, and this one
http://www.taranets.com/cgi/ts/1.37/ts.ws.pl?w=329;b=286
And there was this example as shown down.
I understood all of above examples but this concerning 3d i cannot. Is ...
I'm having some memory problems with an application, but it's a bit difficult to figure out exactly where it is. I have two sets of data:
Pageviews
The page that was requested
The time said page was requested
Memory use
The amount of memory being used
The time this memory use was recorded
I'd like to see exactly which pageviews...
This sample script:
#!/usr/bin/perl -w
while (1)
{
sleep(1);
}
takes about 264 kB
grep -A1 heap /proc/9216/smaps
0817b000-081bd000 rw-p 0817b000 00:00 0 [heap]
Size: 264 kB
but when I only add my module:
#!/usr/bin/perl -w
use my_module;
while (1)
{
sleep(1);
}
it takes 18092 kB !
grep -A1 heap ...
My question is: where do these patterns (below) originate?
I learned (somewhere) that Python has unique "copies", if that's the right word, for small integers. For example:
>>> x = y = 0
>>> id(0)
4297074752
>>> id(x)
4297074752
>>> id(y)
4297074752
>>> x += 1
>>> id(x)
4297074728
>>> y
0
When I look at the memory locations of ints...
Is there anyway in GDB to put a memory watchpoints on page level?
I want to break on first access to a page, this access can be anywhere on that page, so i can't put a normal memory watchpoints - since I don't know the address -
Also, is there anyway to change the page protection of memory page in GDB ( say change from r/w to no access )...
Is it possible that there will still be leaks when running my app on an iPhone even if the simulator has absolutely none??
...
How much real memory should my iphone app be using? What's going too high?
...