Click to See Complete Forum and Search --> : Memory going, going, gone!! (C memory Q)


tecknophreak
02-24-2004, 09:42 PM
If I'm running my program and I see the used memory increase by 4k(a page size) and the cached memory increase likewise, what would cause this?

Is it possibly using new and not delete? I'm pretty sure I'm doing this pretty regularly since it was burned into my brain in my C++ classes.

Is it using something like:

while () {
something = 5;
while (something) {
int x(something);
--something;
}
}


It's got me baffled!! :confused:

tecknophreak
02-24-2004, 09:56 PM
Holy carp!! <-- yeah the fish.

Anywho, I just ran some more tests on my system. I did not notice the cache increasing as well and it took me a little while to figure out what was going on. I feel like an ***.

Well, rather than deleting the post, in case anyone else has this problem, I'll post the solution.

I was running a program which reads from one pci card and writes to another, well, I have debug outputs since I'm just testing currently. Since I wanted to save the output, I just did prog > junk. Well the memory was being eaten up by the cache which stores what should be going to the disk, but the system doesn't have enough to actually write it there. So I was overflowing my disk.