memory

std::string and its automatic memory resizing

I'm pretty new to C++, but I know you can't just use memory willy nilly like the std::string class seems to let you do. For instance: std::string f = "asdf"; f += "fdsa"; How does the string class handle getting larger and smaller? I assume it allocates a default amount of memory and if it needs more, it news a larger block of memory ...

SpringBoard memory allocation (iPhone/iPad)

I have an application under development that uses a large amount of memory for images and OpenGL textures. I have noticed that occasionally, in fact frequently on some devices, SpringBoard, the application which manages the home screen for the iPhone and iPad can take up excessive amounts of memory, sometimes twice as much as normal. W...

What are the benefits of stacked/on chip memory?

I am trying to find some reference materials to write up something about stacked memory's future. I take this to mean memory that is stacked on the processing chip that allows to faster access time, less latency, etc. Is this a technology that is likely to be adopted by major manufacturers, and is it worth keeping tabs on as a "future t...

Memory comparison (with difference position)

Hello! Is there a way to compare two blocks of memory, and know at which point they differ (memcmp() does not meet this requirement)? I wouldn't want to perform costly loops. Thanks in advance. Regards, Neo_b ...

memory usage and minimizing

We have a fairly graphical intensive application that uses the FOX toolkit and OpenSceneGraph, and of course C++. I notice that after running the application for some time, it seems there is a memory leak. However when I minimize, a substantial amount of memory appears to be freed (as witnessed in the Windows Task Manager). When the a...

How do I determine available device memory in OpenCL?

I would like to know how much free memory there is on my device before allocating buffers. Is this possible? I know there's CL_DEVICE_GLOBAL_MEM_SIZE for total memory, and CL_DEVICE_MAX_MEM_ALLOC_SIZE for max size of a single object, but I would like to know the current memory state. As it stands I'm probably going to have to use OpenGL...

Memory profiler for silverlight

Do you have any suggestion/idea of Memory profiler for Silverlight? ...

How to keep memory of process protected.

I have a process that will have some important values in the memory. I don't want anyone to be able to read the memory of my process and obtain those values. So I tried to create a program that would look at the list of programs running and determine if any of them were "debuggers", etc. But I realized that someone could just write a qui...

iAds are leaking memory

I recently implemented iads by following the WWDC video. However, while testing with leaks I found that my ads were leaking. I heard that this is a known problem with iads. Someone mentioned that releasing the banner in viewDidUnload might help but that didn't work for me... Does anyone know any way around these leaks? Even though the...

How much memory array of objects in c# consumes?

Suppose that we have previously instantiated three objects A, B, C from class D now an array defines as below: D[] arr = new D[3]; arr[0]=A; arr[1]=B; arr[2]=C; does array contains references to objects or has separate copy? ...

Memory management in .NET

Has anyone any guideline, book, or article for memory management in c#? I want to improve my memory management information? ...

how to allow a process created by another process, use a part of memory of the creator process ?

I got two console processes that second one is created by first one using the API below: BOOL WINAPI CreateProcess( __in_opt LPCTSTR lpApplicationName, __inout_opt LPTSTR lpCommandLine, __in_opt LPSECURITY_ATTRIBUTES lpProcessAttributes, __in_opt LPSECURITY_ATTRIBUTES lpThreadAttributes, __in BOOL bInherit...

ColdFusion 9 - My thread is holding onto memory - how can I stop it?

Hi all I have a particular thread that I kick off when by CF9 application starts. It manages a queue and takes items from the queue to process them. If there are no items to take from the queue it will sleep(). This thread could live for weeks, processing and sleeping etc. The problem I am having is that the items I am taking from th...

Caching all users in ASP.NET

I am working on a web app in ASP.NET/C# which needs to be scalable to handle the high user load (will probably run in a web farm). Since it will cater to a high number of users, around 1 Million plus, but number of online users would be around 30K-50K. I plan to use caching (provider based), and was wondering: Is it a good idea to cach...

Lua: garbage collection + userdata

Supposing the following situation: typedef struct rgb_t {float r,g,b} rbg_t; // a function for allocating the rgb struct rgb_t* rgb(r,g,b) { rgb_t* c = malloc(sizeof(rgb_t)); c->r=r; c->g=g; c->b=b; return c; } // expose rgb creation to lua int L_rgb (lua_State* L) { rgb_t** ud = (rgb_t **) lua_newuserdata(L, sizeof(rgb_t *)); ...

initialized data segment in C binaries running under Windows

Hi, I am for a long time trying to get a picture how is program memory handled under OS (I use Windows, but I guess this will be the same or very close on Linux). So far, I know (mostly thanks to you stackoverflow users) that local variables are stored on stack. Now I also finally understand why. So thats OK. But what I still miss is, ...

uiwebview and huge memory loss

Hi guys, I have a problem using UIWebViews, I've seen the same question here but there wasn't helpful answer. the question is here: http://stackoverflow.com/questions/2950907/uiwebview-memory-management . I will quote it: I am developing an application that makes heavy use of UIWebView. This app generates dynamically lots of UIWebVie...

.NET GC Clarification Needed for non .net classes in a .net project.

Hi All, I am combating some memory issues in my app and am finally managing to get to the bottom of it. I have had an example recently where my process memory went up to 800mb when processing a task. I have managed to get this to settle at 140mb now which is perfectly acceptable. However this has made me question my understanding of the...

how the stackoverflow affect variable ?

how the stackoverflow affect variable ? ...

Memory management within a message

Take the line [angleLabelInRadians setText:[[NSString alloc] initWithFormat:@"%.3g", [poly angleInRadians]]]; When creating an NSString object within a message, do I still need to release this NSString and, if so, how would I do that, given that I haven't created a pointer to the object? Furthermore, is this correct coding procedure...