This is a dumb question, admittedly, please don't hesitate to vote down. :)
I was debugging the other day and came across some memory- and register-fills I hadn't seen before on some embedded hardware I'm using. So I started a mental catalog. For example:
DEADBEEF, BAADF00D, D15EA5ED, DECEA5ED, BAA5H33P...
Something that sticks out w...
I'd like to track how much memory various programs touch while in specific states. For instance, say I have a graphical program. It might use substantially less memory when it's minimized, since it won't redraw the window, which requires reading images and fonts and executing a large number of library functions. These objects are still a...
Hi guys,
I was wondering if there is a way to find the size of a reference type in C#. I've done some googling and the general idea on the forums seem to be that this isn't possible. I thought I'd ask you guys and see if anyone here knew better ;) ([cough] Jon Skeet [cough])
After all, profiling tools must have a way of doing this? ...
Is there any way to get the size of an instance (or the class I don't mind) in C#?
For example, I know in Delphi every object has a pointer to the Virtual Method Table of the class, a pointer for each interface it implements plus of course the fields of the class.
According to this basic object size is 12 bytes in x86, but, is there an...
Duplicate: What REALLY happens when you don’t free after malloc?
Let's say, for example:
int main()
{
char* test = new char[50000];
return 0;
}
What happens to the allocated memory after the program had finished? Does it get freed for other applications immediately? Or perhaps after some time? Or maybe it's lost to the system...
Hi all,
I've got what I assume is a memory fragmentation issue.
We've recently ported our WinForms application to a WPF application. There's some image processing that this application does, and this processing always worked in the WinForms version of the app. We go to WPF, and the processing dies. Debugging into the library has th...
Hello
Imagine I have the following simple C program:
int main() {
int a=5, b= 6, c;
c = a +b;
return 0;
}
Now, I would like to know the address of the expression c=a+b, that is the program address
where this addition is carried out. Is there any possibility that I could use printf?
Something along the line:
int main() {
int a=5, ...
I'm familiar with some mnemonic/memorization techniques for about a year.
I think that this techniques can give a developer significant benefit or even make you an expert in the field.
If you are familiar with this techniques, you know that there are mnemonic techniques for long-term memorizing. We often read lots of books, and there a...
I have a large .NET C# application with a memory leak. Using ants memory profiler, I can see that there are multiple versions of same user controls in memory and the garbage collector is not collecting them. There is output caching on the web forms but no output caching on the actual user controls.
Is there a reason why the user contro...
0:000> !dumpheap -stat
total 1755874 objects
Statistics:
MT Count TotalSize Class Name
7b9b0c64 1 12 System.Windows.Forms.Layout.TableLayout+ColumnSpanComparer
....
7933303c 14006 4926456 System.Collections.Hashtable+bucket[]
65246e00 804 4982192 System.Data.RBTree`1+Node[[System.Int32, mscorlib]]...
There are lots of method to allocate memory in windows enviorment,
such as VirtualAlloc/HeapAlloc/malloc/new.
Thus , what's the difference among them?
...
Is there any way to share memory between matlab processes on the same computer?
I am running several matlab processes on a multi-core computer (running windowsif it matters). They all use the same gigantic input data. It would be nice to only have a single copy of it in memory.
Edit: Unfortunately each process needs access to the who...
In short, I want to find windows equivalent way of unix setrusage() function.
Can I limit resource usage for particular process? For example, 10 seconds cpu time and 50mb memory size. If the process run more than 10 seconds or consumes more than 50mb memory, the process will be terminated by windows.
...
I think I'm missing some fundamentals here so hopefully this post can clarify this.
I've taken a dump and am looking at the managed heap and am interested in looking specifically at what objects are within each heap. Here is the output from the debugger:
0:000> !eeheap -gc
Number of GC Heaps: 1
generation 0 starts at 0x3cca447c
generat...
What's a good way to profile a PHP page's memory usage? For example, to see how much memory my data is using, and/or which function calls are allocating the most memory.
xdebug doesn't seem to provide memory information in its profiling feature.
xdebug does provide it in its tracing feature. This is pretty close to what I want, except ...
So here is the problem.
I have a method (or message as they are called in obj-C)
I am passing in a pointer to an object.
inside that method i am going to change what that pointer is pointing to, and release the old object. And i would like the instance variable (which is being passed into the method) to now reference the new value assi...
I have a bunch of buffers (25 to 30 of them) in my application that are are fairly large (.5mb) and accessed simulataneousley. To make it even worse the data in them is generally only read once, and it is updated frequently (like 30 times per second). Sort of the perfect storm of non optimal cache use.
Anyhow, it occurred to me that it ...
Hi all,
My PHP web application has an API that can recieve reasonably large files (up to 32 MB) which are base64 encoded. The goal is to write these files somewhere on my filesystem. Decoded of course. What would be the least resource intensive way of doing this?
Edit: Recieving the files through an API means that I have a 32MB string ...
I have a large set of numbers, probably in the multiple gigabytes range. First issue is that I can't store all of these in memory. Second is that any attempt at addition of these will result in an overflow. I was thinking of using more of a rolling average, but it needs to be accurate. Any ideas?
These are all floating point numbers.
T...
I have have an application which consists of an windows form project and a class library project. When it starts the executable sets a static value in the dll.
using MyClassLibrary;
namespace MyExeApplication
{
public partial class MainForm : Form
{
Hashtable ht = null;
void Form_Load(...)
{
ht = ...