memory

Ambiguous scénario for iPhone memory management

Hey guys, i have some difficulties to understand this scénario ... i create an object i set its retained property to something i Forget to release its property i release the object as i didn't release the property in the dealloc method, Will the scénario result in a memory leak or Will the property be released automatically ? And ...

Android - Is there an SDK way to find out the exact amount of memory consumed by a process identified by its pid?

I would like to check the memory consumption of each running processes individually, cat /proc//statm is ok, but opening a shell for each check is time consuming, and maybe not the best way. any advices how to do it with the SDK? ...

Concatenating a string and byte array in to unmanaged memory.

This is a followup to my last question. I now have a byte[] of values for my bitmap image. Eventually I will be passing a string to the print spooler of the format String.Format("GW{0},{1},{2},{3},", X, Y, stride, _Bitmap.Height) + my binary data; I am using the SendBytesToPrinter command from here. Here is my code so far to send it t...

Android Pausing and Resuming Tutorial

I'm having some difficulty figuring out the best ways to pause and resume my application. Is there any comprehensive tutorial or something similar that would help me make sure that I'm not missing any important steps? Mostly I'm just worried about not dealing with the memory being used by my application. There's a few apps I own that w...

linked list elements gone?

I create a linked list dynamically and initialize the first node in main(), and I add to the list every time I spawn a worker process. Before the worker process exits, I print the list. Also, I print the list inside my sigchld signal handler. in main(): head = NULL; tail = NULL; // linked list to keep track of worker process dll_node_t...

Are there more secure alternatives to the .Net SQLConnection class?

Hi SO people, I'm very surprised this issue hasn't been discussed in-depth: This article tells us how to use windbg to dump a running .Net process strings in memory. I spent much time researching the SecureString class, which uses unmanaged pinned memory blocks, and keeps the data encrypted too. Great stuff. The problem comes in when ...

How to save memory when reading a file in Php ?

I have a 200kb file, what I use in multiple pages, but on each page I need only 1-2 lines of that file so how I can read only these lines what I need if I know the line number? For example if I need only the 10th line, I don`t want to load in memory all the lines, just the 10th line. Sorry for my bad english! ...

From where starts the process' memory space and where does it end?

Hi, On Windows platform, I'm trying to dump memory from my application where the variables lie. Here's the function: void MyDump(const void *m, unsigned int n) { const unsigned char *p = reinterpret_cast<const unsigned char *>(m); char buffer[16]; unsigned int mod = 0; for (unsigned int i = 0; i < n; +...

Spreadsheet::WriteExcel Memory Usage

Hi; I'm trying to create a multi-sheet excel document, and thus far I'd been doing it in PHP - but using PHPExcel was eating up 70MB of RAM for about 60,000 spreadsheet cells total. I'm wondering if anyone has experience with Spreadsheet::WriteExcel and if it has problems with creating very large documents. I'd just give it a shot bu...

NSMutableArray accessing issue.

I've searched and have no answer. I've created an NSMutableArray and am getting an EXC_BAD_ACCESS error in one place of access. Here. This is declaring in the .h file: NSMutableArray *buttons; ... @property (nonatomic, retain)NSMutableArray *buttons; And this is the synthesizing and implimenting: @synthesize buttons; ... - (id)init {...

Perl version of php's memory_get_peak_usage

Is there something in perl similar to PHP's memory_get_peak_usage? For example, in PHP I can stick in the line: echo "Peak memory usage: " . (memory_get_peak_usage(true) / 1024 / 1024) . " MB\r\n"; and it does pretty much what it says. I need a way to get the same sort of information in a perl script. I should note that this for a C...

AS3 Memory Leak Example

Can someone post an example of as3 code (specifically event listener included) that would be a simple example of something that could leak memory... also hopefully could you post a solution to the problem shown? The question is: What is a simple example of leaking memory in an AS3 event listener and how can you solve it? ...

Looking for a commercial or free library similar to Hyperic SIGAR

Anybody knows a Java library similar to Hyperic SIGAR?. I'm interested mostly in process monitoring & CPU usage. ...

Calculate private working set (memory) using C#.

Hello, How do I calculate the private working set of memory using C#? I'm interested in produces roughly the same figure as taskmgr.exe. I'm using the Process namespace and using methods/data like WorkingSet64 and PrivateMemorySize64, but these figures are off by 100MB or more at times. Thanks, ...

Access Violation Using memcpy or Assignment to an Array in a Struct

Update 2: Well I’ve refactored the work-around that I have into a separate function. This way, while it’s still not ideal (especially since I have to free outside the function the memory that is allocated inside the function), it does afford the ability to use it a little more generally. I’m still hoping for a more optimal and elegant s...

Why does this Object wonk out & get deleted ?

Stepping through the debugger, the BBox object is okay at the entry of the function, but as soon as it enters the function, the vfptr object points to 0xccccc. I don't get it. What is causing this ? Why is there a virtual table reference in there when the object is not derived from other class. (Though, it resides in GameObject from ...

How to prevent latex memory overflow

I've got a latex macro that makes small pictures. In that picture I need to draw area. Borders of that area are quadratic bezier curves and that area is to be filled. I did not know how to do it so currently I'm "filling" the area by drawing a plenty of bezier curves inside it... This slows down typeseting and when a macro is used multi...

How is external memory, internal memory, and cache organized?

Consider a system as follows: a hardware board having say ARM Cortex-A8 and Neon Vector coprocessor, and Embedded Linux OS running on Cortex-A8. On this environment, if some application - say, a video decoder - is executing, then: How is it decided which buffers would be in external memory, which ones would be allocated in internal SRA...

return value (not a reference) from the function, bound to a const reference in the calling function; how is its lifetime extended to the scope of the calling function ?

"If you return a value (not a reference) from the function, then bind it to a const reference in the calling function, its lifetime would be extended to the scope of the calling function." So: CASE A const BoundingBox Player::GetBoundingBox(void) { return BoundingBox( &GetBoundingSphere() ); } Returns a value of type const Boundi...

Understanding memory and cpu speed

Firstly, I am working on a windows xp 64 machine with 4gb ram and 2.29 ghz x4 I am indexing 220,000 lines of text that are more or less the same length. These are divided into 15 equally sized files. File 1/15 takes 1 minute to index. As the script indexes more files, it seems to take much longer with file 15/15 taking 40 minutes. My ...