memory

Memory leak in Flash Control or .NET Application??

I have created created a windows application which loads flash movies in modal window form by selecting one of the movie from the parent form. What happens is that user can play that movie in auto mode for let's say 20 minutes. I watch the Task manager closely and what happens is my application memory goes on increasing and it never gets...

BSS, Stack, Heap, Data, Code/Text - Where each of these start in memory?

Segments of memory - BSS, Stack, Heap, Data, Code/Text (Are there any more?). Say I have a 128MB RAM, Can someone tell me: How much memory is allocated for each of these memory segments? Where do they start? Please specify the address range or something like that for better clarity. What factors influence which should start where? ...

UIViewController Memory Warning issues

Hi All, Something odd is happening with my view controllers. When an applicationDidReceiveMemoryWarning is posted, it removes all views from the stack other than the visible view (a second level view) which is expected behaviour. However, if I then navigate back to the root view, it also has a back button that navigates back to itself. ...

Best way to store many files in disk

I couldn't find a good title for the question, this is what I'm trying to do: This is .NET application. I need to store up to 200000 objects (between 3KB-500KB) I need to store about 10 of them per second from multiple-threads I use binaryserialization before storing it I need to access them later on by an integer, unique id What's...

System-specific bug hunting?

Hey all, I have recently been messing around with SFML, a multimedia library. I use C# so naturally I went for the .Net binding, which you can fetch from the SVN in the latest 2.0 version. After a while of messing around I noticed that my application would sometimes hang up when using the Text object, an object used to draw texture font...

.net Application hanging. Weird crash-dump.

Hi, A production server has an application running 24x7, and sometimes it starts consuming near 50% of CPU. I couldn't reproduce it locally, but I did a Memory Dump with adplus. The server has Windows 2008 Server 64bits, .NET 3.5. The application listens to a MSMQ and has a thread pool to execute operations, when I did the memory dump it...

how to find a address everytime.

i have been working on a server and it works with 2 programs i made one is the server and one is the error handler and if the main server fails it restarts it. the 2nd program's main way to handle data is by reading the values from the program(because when i was debugging i was filling in the address's), because writeing the values to a ...

Software to track several memory errors in old project?

Hello, I am programming a game since 2 years ago. sometimes some memory errors (ie: a function returning junk instead of what it was supposed to return, or a crash that only happen on Linux, and never happen with GDB or Windows) happen seemly at random. That is, I try to fix it, and some months later the same errors return to haunt me. ...

Flash Memory Leak Problem

I have got a memory leak problem in the example below(u can download the code from the link) http://brandonmeyer.net/projects/SuperPanelDemo/SuperPanelDemo.html Running in Profiler:- What I am trying to do is creating new panels by selecting the Add new panel button. I am selecting option allow Close (check box). (After creating ...

Javascript private methods -- what is the memory impact?

I'm working on a bit of code where I'm attempting to hide some private variables inside closures. The thing is the environment is fairly constrained in terms of memory, so I'm also concerned with keeping the overall footprint of the classes low. What is the impact of using closures to hide private instance variables and methods when com...

How to delete a binary search tree from memory?

I have a BST which is a linked list in C++. How would I delete the whole thing from memory? Would it be done from a class function? ...

How to make Java read very big files using Scanner?

I'm using the following basic function which I copied from the net to read a text file public void read () { File file = new File("/Users/MAK/Desktop/data.txt"); System.out.println("Start"); try { // // Create a new Scanner object which will read the data from the // file passed in. To check i...

querying for memory details in shell

Hi, Is there a shell command to know about how much memory is being used at a particular moment and details of how much each process is using, how much virtual memory is left etc? ...

How to implement a variable-length ‘string’-y in C

I’ve googled quite a bit, but I can’t find information on how variable-length strings are generally implemented in higher-level languages. I’m creating my own such language, and am not sure where to start with strings. I have a struct describing the string type, and then a create function that allocates such a ‘string’: /* A safer `str...

Memory allocation for _M_start and _M_finish in a vector

I'm defining a vector as: vector< int, MyAlloc< int> > *v = new vector< int, MyAllooc< int> > (4); MyAlloc is allocating space for only 4 ints. Memory for _M_start, _M_finish, and _M_end_of_storage is being allocated on the heap before the memory for the 4 ints. But who is allocating this memory for _M_start, _M_finish, and _M_end_of_...

Moving C++ objects, especially stl containers, to a specific memory location

I am working with a memory manager that, on occasion, wants to defragment memory. Basically, I will go through a list of objects allocated by the memory manager and relocate them: class A { SomeClass* data; // This member is allocated by the special manager }; for(... each instance of A ...) a.data = memory_manager.relocate(a.da...

new returns NULL when initializing static global variable in windows?

I'm working on integrating rLog with our code base, and I'm noticing a problem on Windows that I don't have on linux. In a header file I have a static variable that gives me a "verbose" logging channel (one up from debug basically), defined thusly: static RLogChannel *rlog_verbose = DEF_CHANNEL("verbose", Log_Debug); There's no probl...

Is there a need to check for NULL after allocating memory, when kernel uses overcommit memory

It is general practice to check for NULL (whether memory is successfully allocated) after a malloc, some thing like void *ptr = malloc(10); if (ptr) { // do some thing usefull } else { // no memory. safely return/throw ... } with memory overcommit enabled in kernel, is there a chance of getting NULL. Should i follow the practice o...

Objective-C / Cocoa: Uploading Images, Working Memory, And Storage.

Hello. I'm in the process of porting an application originally in java to cocoa, but I'm rewriting it to make it much better, since I prefer cocoa a lot anyway. One of the problems I had in the application, was that when you uploaded images to it, I had the images created, (as say an NSImage object) and then I just had them sitting in ...

Horizontal Vs Vertical browsing of array

Lets consider two almost identical codes: First for (int k=0;k<1000;k++) { for (int i=0;i<600;i++) { for (int j=0;j<600;j++) { tab[i][j] = i *j; } } } Second for (int k=0;k<1000;k++) { for (int i=0;i<600;i++) { for (int j=0;j<600;j++) { t...